diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2018-09-26 15:34:58 -0700 |
---|---|---|
committer | Aina Niemetz <aina.niemetz@gmail.com> | 2018-09-26 15:34:58 -0700 |
commit | bd866bbf75606663315c15ce4f28862e99b70cbd (patch) | |
tree | 8ef70ba013d0408072c2d73548c56a6881bf5457 /test/CMakeLists.txt | |
parent | 79e866c5150a1d8e4d613f1673bfbf33eb157653 (diff) |
cmake: Fix test target dependency issues. (#2540)
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r-- | test/CMakeLists.txt | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 44cf5a651..b85ecf9e7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,20 @@ #-----------------------------------------------------------------------------# +# Add target 'check', builds and runs +# > unit tests +# > regression tests of levels 0 and 1 +# > system tests + +# Note: Do not add custom targets for running tests (regress, systemtests, +# units) as dependencies to other run targets. This will result in executing +# tests multiple times. For example, if check would depend on regress it would +# first run the command of the regress target (i.e., run all regression tests) +# and afterwards run the command specified for the check target. +# Dependencies of check are added in the corresponding subdirectories. +add_custom_target(check + COMMAND + ctest --output-on-failure -LE "regress[2-4]" -j${CTEST_NTHREADS} $(ARGS)) + +#-----------------------------------------------------------------------------# # Add subdirectories add_subdirectory(regress) @@ -11,20 +27,3 @@ endif() if(ENABLE_UNIT_TESTING) add_subdirectory(unit EXCLUDE_FROM_ALL) endif() - -#-----------------------------------------------------------------------------# -# Add target 'check', builds and runs -# > unit tests -# > regression tests of levels 0 and 1 -# > system tests - -add_custom_target(check - COMMAND - ctest --output-on-failure -LE "regress[2-4]" -j${CTEST_NTHREADS} $(ARGS) - DEPENDS regress systemtests) -if(BUILD_BINDINGS_JAVA) - add_dependencies(check cvc4javatests) -endif() -if(ENABLE_UNIT_TESTING) - add_dependencies(check units) -endif() |