Commit 4033d186 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

multiple tags per test in cmake build

Reviewed By: Orvid

Differential Revision: D27537202

fbshipit-source-id: d1aa8ad81f3749129dd6f1795e788a0e55d9f06a
parent c841c365
...@@ -202,7 +202,7 @@ function(folly_define_tests) ...@@ -202,7 +202,7 @@ function(folly_define_tests)
set(test_${cur_test}_content_dir) set(test_${cur_test}_content_dir)
set(test_${cur_test}_headers) set(test_${cur_test}_headers)
set(test_${cur_test}_sources) set(test_${cur_test}_sources)
set(test_${cur_test}_tag "NONE") set(test_${cur_test}_tag)
set(argumentState 0) set(argumentState 0)
while (currentArg LESS ${ARGC}) while (currentArg LESS ${ARGC})
...@@ -221,13 +221,13 @@ function(folly_define_tests) ...@@ -221,13 +221,13 @@ function(folly_define_tests)
break() break()
elseif (argumentState EQUAL 0) elseif (argumentState EQUAL 0)
if ("x${ARGV${currentArg}}" STREQUAL "xBROKEN") if ("x${ARGV${currentArg}}" STREQUAL "xBROKEN")
set(test_${cur_test}_tag "BROKEN") list(APPEND test_${cur_test}_tag "BROKEN")
elseif ("x${ARGV${currentArg}}" STREQUAL "xHANGING") elseif ("x${ARGV${currentArg}}" STREQUAL "xHANGING")
set(test_${cur_test}_tag "HANGING") list(APPEND test_${cur_test}_tag "HANGING")
elseif ("x${ARGV${currentArg}}" STREQUAL "xSLOW") elseif ("x${ARGV${currentArg}}" STREQUAL "xSLOW")
set(test_${cur_test}_tag "SLOW") list(APPEND test_${cur_test}_tag "SLOW")
elseif ("x${ARGV${currentArg}}" STREQUAL "xWINDOWS_DISABLED") elseif ("x${ARGV${currentArg}}" STREQUAL "xWINDOWS_DISABLED")
set(test_${cur_test}_tag "WINDOWS_DISABLED") list(APPEND test_${cur_test}_tag "WINDOWS_DISABLED")
else() else()
message(FATAL_ERROR "Unknown test tag '${ARGV${currentArg}}'!") message(FATAL_ERROR "Unknown test tag '${ARGV${currentArg}}'!")
endif() endif()
...@@ -264,11 +264,13 @@ function(folly_define_tests) ...@@ -264,11 +264,13 @@ 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 "xBROKEN" AND BUILD_BROKEN_TESTS) OR 1
("x${test_${cur_test}_tag}" STREQUAL "xSLOW" AND BUILD_SLOW_TESTS) OR # TODO: Use IN_LIST after cmake 3.3
("x${test_${cur_test}_tag}" STREQUAL "xHANGING" AND BUILD_HANGING_TESTS) OR AND (test_${cur_test}_tag MATCHES "\\bBROKEN\\b" OR BUILD_BROKEN_TESTS)
("x${test_${cur_test}_tag}" STREQUAL "xWINDOWS_DISABLED" AND NOT WIN32) AND (test_${cur_test}_tag MATCHES "\\bSLOW\\b" OR BUILD_SLOW_TESTS)
AND (test_${cur_test}_tag MATCHES "\\bHANGING\\b" OR BUILD_HANGING_TESTS)
AND (test_${cur_test}_tag MATCHES "\\bWINDOWS_DISABLED\\b" OR NOT WIN32)
) )
set(cur_test_name ${test_${cur_test}_name}) set(cur_test_name ${test_${cur_test}_name})
set(cur_dir_name ${directory_${test_${cur_test}_directory}_name}) set(cur_dir_name ${directory_${test_${cur_test}_directory}_name})
......
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