Commit 05e06a97 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Add support for tagging a test as BROKEN in the CMake build

Summary: Also use it to disable function_test and indexed_mem_pool_test for now while the source of their breakage is being investigated.

Reviewed By: yfeldblum

Differential Revision: D5440415

fbshipit-source-id: 630c884ccd2db660bfc3e4529a2d35941d3bd0d3
parent 3179d446
...@@ -205,7 +205,9 @@ function(folly_define_tests) ...@@ -205,7 +205,9 @@ function(folly_define_tests)
"x${ARGV${currentArg}}" STREQUAL "xDIRECTORY") "x${ARGV${currentArg}}" STREQUAL "xDIRECTORY")
break() break()
elseif (argumentState EQUAL 0) elseif (argumentState EQUAL 0)
if ("x${ARGV${currentArg}}" STREQUAL "xHANGING") if ("x${ARGV${currentArg}}" STREQUAL "xBROKEN")
set(test_${cur_test}_tag "BROKEN")
elseif ("x${ARGV${currentArg}}" STREQUAL "xHANGING")
set(test_${cur_test}_tag "HANGING") set(test_${cur_test}_tag "HANGING")
elseif ("x${ARGV${currentArg}}" STREQUAL "xSLOW") elseif ("x${ARGV${currentArg}}" STREQUAL "xSLOW")
set(test_${cur_test}_tag "SLOW") set(test_${cur_test}_tag "SLOW")
...@@ -246,6 +248,7 @@ function(folly_define_tests) ...@@ -246,6 +248,7 @@ function(folly_define_tests)
set(cur_test 0) set(cur_test 0)
while (cur_test LESS test_count) while (cur_test LESS test_count)
if ("x${test_${cur_test}_tag}" STREQUAL "xNONE" OR if ("x${test_${cur_test}_tag}" STREQUAL "xNONE" OR
("x${test_${cur_test}_tag}" STREQUAL "xBROKEN" AND BUILD_BROKEN_TESTS) OR
("x${test_${cur_test}_tag}" STREQUAL "xSLOW" AND BUILD_SLOW_TESTS) OR ("x${test_${cur_test}_tag}" STREQUAL "xSLOW" AND BUILD_SLOW_TESTS) OR
("x${test_${cur_test}_tag}" STREQUAL "xHANGING" AND BUILD_HANGING_TESTS) ("x${test_${cur_test}_tag}" STREQUAL "xHANGING" AND BUILD_HANGING_TESTS)
) )
......
...@@ -243,6 +243,7 @@ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/folly-deps.cmake "\ninclude(folly-target ...@@ -243,6 +243,7 @@ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/folly-deps.cmake "\ninclude(folly-target
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/folly-deps.cmake DESTINATION share/folly RENAME folly-config.cmake) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/folly-deps.cmake DESTINATION share/folly RENAME folly-config.cmake)
option(BUILD_TESTS "If enabled, compile the tests." OFF) option(BUILD_TESTS "If enabled, compile the tests." OFF)
option(BUILD_BROKEN_TESTS "If enabled, compile tests that are known to be broken." OFF)
option(BUILD_HANGING_TESTS "If enabled, compile tests that are known to hang." OFF) option(BUILD_HANGING_TESTS "If enabled, compile tests that are known to hang." OFF)
option(BUILD_SLOW_TESTS "If enabled, compile tests that take a while to run in debug mode." OFF) option(BUILD_SLOW_TESTS "If enabled, compile tests that take a while to run in debug mode." OFF)
if (BUILD_TESTS) if (BUILD_TESTS)
...@@ -502,7 +503,8 @@ if (BUILD_TESTS) ...@@ -502,7 +503,8 @@ if (BUILD_TESTS)
TEST format_other_test SOURCES FormatOtherTest.cpp TEST format_other_test SOURCES FormatOtherTest.cpp
TEST format_test SOURCES FormatTest.cpp TEST format_test SOURCES FormatTest.cpp
TEST function_scheduler_test SOURCES FunctionSchedulerTest.cpp TEST function_scheduler_test SOURCES FunctionSchedulerTest.cpp
TEST function_test SOURCES FunctionTest.cpp TEST function_test BROKEN
SOURCES FunctionTest.cpp
TEST function_ref_test SOURCES FunctionRefTest.cpp TEST function_ref_test SOURCES FunctionRefTest.cpp
TEST futex_test SOURCES FutexTest.cpp TEST futex_test SOURCES FutexTest.cpp
TEST group_varint_test SOURCES GroupVarintTest.cpp TEST group_varint_test SOURCES GroupVarintTest.cpp
...@@ -510,7 +512,8 @@ if (BUILD_TESTS) ...@@ -510,7 +512,8 @@ if (BUILD_TESTS)
TEST has_member_fn_traits_test SOURCES HasMemberFnTraitsTest.cpp TEST has_member_fn_traits_test SOURCES HasMemberFnTraitsTest.cpp
TEST hash_test SOURCES HashTest.cpp TEST hash_test SOURCES HashTest.cpp
TEST indestructible_test SOURCES IndestructibleTest.cpp TEST indestructible_test SOURCES IndestructibleTest.cpp
TEST indexed_mem_pool_test SOURCES IndexedMemPoolTest.cpp TEST indexed_mem_pool_test BROKEN
SOURCES IndexedMemPoolTest.cpp
# MSVC Preprocessor stringizing raw string literals bug # MSVC Preprocessor stringizing raw string literals bug
#TEST json_test SOURCES JsonTest.cpp #TEST json_test SOURCES JsonTest.cpp
TEST json_other_test TEST json_other_test
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment