diff options
author | John Wiegley <johnw@newartisans.com> | 2012-05-20 05:01:17 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-05-20 05:01:17 -0500 |
commit | 627574492ee7e24c6d4e78a39c619096521ee300 (patch) | |
tree | 03d9cd9c68ecb2a8be29e147f4993d40bdb351d9 /test/CMakeLists.txt | |
parent | 4681e58d7f3cda2a2ac6d05b6ec1a106f568e029 (diff) | |
download | fork-ledger-627574492ee7e24c6d4e78a39c619096521ee300.tar.gz fork-ledger-627574492ee7e24c6d4e78a39c619096521ee300.tar.bz2 fork-ledger-627574492ee7e24c6d4e78a39c619096521ee300.zip |
Enable the baseline and manual tests
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r-- | test/CMakeLists.txt | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 92c2a763..b5d8cf09 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,15 +2,40 @@ include(ProcessorCount) ProcessorCount(PROCESSORS) if(NOT PROCESSORS EQUAL 0) - set(CTEST_BUILD_FLAGS -j${PROCESSORS}) - set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${PROCESSORS}) + math(EXPR JOBS "${PROCESSORS} * 2") + set(CTEST_BUILD_FLAGS -j${JOBS}) endif() get_target_property(LEDGER_LOCATION ledger LOCATION) -add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} ${CTEST_BUILD_FLAGS}) add_subdirectory(unit) + +if(HAVE_BOOST_PYTHON) + set(TEST_PYTHON_FLAGS "--python") +endif() + +macro(add_ledger_harness_tests _class) + if(PYTHONINTERP_FOUND) + file(GLOB ${_class}_TESTS *.test) + foreach(TestFile ${${_class}_TESTS}) + get_filename_component(TestFile_Name ${TestFile} NAME_WE) + string(FIND ${TestFile_Name} "_py" TestFile_IsPythonTest) + if((NOT TestFile_IsPythonTest) OR HAVE_BOOST_PYTHON) + add_test(${_class}Test_${TestFile_Name} + ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/RegressTests.py + ${LEDGER_LOCATION} ${PROJECT_SOURCE_DIR} + ${TestFile} ${TEST_PYTHON_FLAGS}) + set_target_properties(check + PROPERTIES DEPENDS ${_class}Test_${TestFile_Name}) + endif() + endforeach() + endif() +endmacro(add_ledger_harness_tests _class) + +add_subdirectory(manual) +add_subdirectory(baseline) add_subdirectory(regress) ### CMakeLists.txt ends here |