diff options
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r-- | test/CMakeLists.txt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 000000000..2e062bd85 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,30 @@ +# Determine number of threads available, used to configure (default) parallel +# execution of custom test targets (can be overriden with ARGS=-jN). +include(ProcessorCount) +ProcessorCount(NTHREADS) +if(NTHREADS EQUAL 0) + set(NTHREADS 1) +endif() + +#-----------------------------------------------------------------------------# +# Add subdirectories + +add_subdirectory(regress) +add_subdirectory(system) + +if(BUILD_BINDINGS_JAVA) + add_subdirectory(java) +endif() + +if(ENABLE_UNIT_TESTING) + add_subdirectory(unit) +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${NTHREADS} $(ARGS)) |