From 31ccb6d368c26481d815ba4b54b32752e564239e Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Sat, 29 Nov 2014 09:06:14 +0100 Subject: Fix and re-enable DocTests --- test/CMakeLists.txt | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'test/CMakeLists.txt') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 21d27c7d..44db81fb 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -36,17 +36,16 @@ add_subdirectory(manual) add_subdirectory(baseline) add_subdirectory(regress) -# jww (2014-04-17): This is temporary until we find a fix. -#if (PYTHONINTERP_FOUND) -# set(_class DocTests) -# file(GLOB ${_class}_TESTS ${PROJECT_SOURCE_DIR}/doc/*.texi) -# foreach(TestFile ${${_class}_TESTS}) -# get_filename_component(TestFile_Name ${TestFile} NAME_WE) -# add_test(NAME ${_class}Test_${TestFile_Name} -# COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/DocTests.py -# --ledger $ --file ${TestFile}) -# set_target_properties(check PROPERTIES DEPENDS ${_class}Test_${TestFile_Name}) -# endforeach() -#endif() +if (PYTHONINTERP_FOUND) + set(_class DocTests) + file(GLOB ${_class}_TESTS ${PROJECT_SOURCE_DIR}/doc/*.texi) + foreach(TestFile ${${_class}_TESTS}) + get_filename_component(TestFile_Name ${TestFile} NAME_WE) + add_test(NAME ${_class}Test_${TestFile_Name} + COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/DocTests.py + --ledger $ --file ${TestFile}) + set_target_properties(check PROPERTIES DEPENDS ${_class}Test_${TestFile_Name}) + endforeach() +endif() ### CMakeLists.txt ends here -- cgit v1.2.3