Skip to content

Commit

Permalink
Merge pull request diffblue#1408 from reuk/reuk/regression-filenames
Browse files Browse the repository at this point in the history
Automatically deduce test names from dir names
  • Loading branch information
Thomas Kiley authored Sep 21, 2017
2 parents b4f57ee + 413fc1b commit 0e14431
Show file tree
Hide file tree
Showing 16 changed files with 7 additions and 20 deletions.
12 changes: 7 additions & 5 deletions regression/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ macro(add_test_pl_profile name cmdline flag profile)
)
endmacro(add_test_pl_profile)

macro(add_test_pl_tests name cmdline)
add_test_pl_profile("${name}" "${cmdline}" -C CORE)
add_test_pl_profile("${name}" "${cmdline}" -T THOROUGH)
add_test_pl_profile("${name}" "${cmdline}" -F FUTURE)
add_test_pl_profile("${name}" "${cmdline}" -K KNOWNBUG)
macro(add_test_pl_tests cmdline)
get_filename_component(TEST_DIR_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
message(STATUS "Adding tests in directory: ${TEST_DIR_NAME}")
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -C CORE)
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -T THOROUGH)
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -F FUTURE)
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -K KNOWNBUG)
endmacro(add_test_pl_tests)

add_subdirectory(ansi-c)
Expand Down
1 change: 0 additions & 1 deletion regression/ansi-c/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
add_test_pl_tests(
"ansi-c"
"$<TARGET_FILE:goto-cc>"
)
1 change: 0 additions & 1 deletion regression/cbmc-java-inheritance/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
add_test_pl_tests(
"cbmc-java-inheritance"
"$<TARGET_FILE:cbmc>"
)
1 change: 0 additions & 1 deletion regression/cbmc-java/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
add_test_pl_tests(
"cbmc-java"
"$<TARGET_FILE:cbmc>"
)
1 change: 0 additions & 1 deletion regression/cbmc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
add_test_pl_tests(
"cbmc"
"$<TARGET_FILE:cbmc>"
)
1 change: 0 additions & 1 deletion regression/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
add_test_pl_tests(
"cpp"
"$<TARGET_FILE:goto-cc>"
)
1 change: 0 additions & 1 deletion regression/goto-analyzer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
add_test_pl_tests(
"goto-analyzer"
"$<TARGET_FILE:goto-analyzer>"
)
1 change: 0 additions & 1 deletion regression/goto-cc-cbmc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ else()
endif()

add_test_pl_tests(
"goto-cc-cbmc"
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:cbmc> ${is_windows}"
)
1 change: 0 additions & 1 deletion regression/goto-cc-goto-analyzer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ else()
endif()

add_test_pl_tests(
"goto-cc-goto-analyzer"
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-analyzer> ${is_windows}"
)
1 change: 0 additions & 1 deletion regression/goto-diff/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
add_test_pl_tests(
"goto-diff"
"$<TARGET_FILE:goto-diff>"
)
1 change: 0 additions & 1 deletion regression/goto-instrument-typedef/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ else()
endif()

add_test_pl_tests(
"goto-instrument-typedef"
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-instrument> ${is_windows}"
)
1 change: 0 additions & 1 deletion regression/goto-instrument/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ else()
endif()

add_test_pl_tests(
"goto-instrument"
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-instrument> $<TARGET_FILE:cbmc> ${is_windows}"
)
1 change: 0 additions & 1 deletion regression/invariants/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ add_executable(driver driver.cpp)
target_link_libraries(driver big-int util)

add_test_pl_tests(
"invariants"
"$<TARGET_FILE:driver>"
)
1 change: 0 additions & 1 deletion regression/strings-smoke-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
add_test_pl_tests(
"strings-smoke-test"
"$<TARGET_FILE:cbmc>"
)
1 change: 0 additions & 1 deletion regression/strings/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
add_test_pl_tests(
"strings"
"$<TARGET_FILE:cbmc>"
)
1 change: 0 additions & 1 deletion regression/test-script/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
add_test_pl_tests(
"test-script"
"${CMAKE_CURRENT_SOURCE_DIR}/program_runner.sh"
)

0 comments on commit 0e14431

Please sign in to comment.