Skip to content

Commit 9e2fef1

Browse files
committed
Pass --smoke to all ctest tests uniformly
Functional tests don't currently read --smoke (most use `int main()` with no args, the rest UNUSED(argc, argv)) so passing it is a silent no-op. But there's no reason to gate the flag on TEST_CATEGORY: keeping the perf/non-perf split forces every future test that wants a smoke mode to also touch CMake. Collapse the four-arm add_test() block into two arms (release vs not), each unconditionally appending --smoke. Any test that wants to honour it just reads the flag; any test that doesn't, ignores it.
1 parent e0ce189 commit 9e2fef1

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -568,20 +568,11 @@ if(NOT SNMALLOC_HEADER_ONLY_LIBRARY)
568568

569569
if (${TEST} MATCHES "release-.*")
570570
message(VERBOSE "Adding test: ${TESTNAME} only for release configs")
571-
if (${TEST_CATEGORY} MATCHES "perf")
572-
add_test(NAME ${TESTNAME} COMMAND ${TESTNAME} --smoke
573-
CONFIGURATIONS "Release")
574-
else()
575-
add_test(NAME ${TESTNAME} COMMAND ${TESTNAME}
576-
CONFIGURATIONS "Release")
577-
endif()
571+
add_test(NAME ${TESTNAME} COMMAND ${TESTNAME} --smoke
572+
CONFIGURATIONS "Release")
578573
else()
579574
message(VERBOSE "Adding test: ${TESTNAME}")
580-
if (${TEST_CATEGORY} MATCHES "perf")
581-
add_test(NAME ${TESTNAME} COMMAND ${TESTNAME} --smoke)
582-
else()
583-
add_test(${TESTNAME} ${TESTNAME})
584-
endif()
575+
add_test(NAME ${TESTNAME} COMMAND ${TESTNAME} --smoke)
585576
endif()
586577
if (${TEST_CATEGORY} MATCHES "perf")
587578
message(VERBOSE "Single threaded test: ${TESTNAME}")

0 commit comments

Comments
 (0)