diff options
Diffstat (limited to 'test/CMakeLists.txt')
-rwxr-xr-x | test/CMakeLists.txt | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2a597ab..6da3a6b 100755 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -9,7 +9,9 @@ else(SPEC_TESTS) find_package(PythonInterp 3) endif(SPEC_TESTS) -add_test(NAME api_test COMMAND api_test) +if (CMARK_SHARED) + add_test(NAME api_test COMMAND api_test) +endif() if (WIN32) file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/src WIN_DLL_DIR) @@ -28,15 +30,30 @@ IF (PYTHONINTERP_FOUND) "${CMAKE_CURRENT_SOURCE_DIR}/normalize.py" ) - add_test(spectest_library - ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" - "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt" "--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src" - ) - - add_test(pathological_tests_library - ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/pathological_tests.py" - "--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src" - ) + if (CMARK_SHARED) + add_test(spectest_library + ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" + "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt" "--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src" + ) + + add_test(pathological_tests_library + ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/pathological_tests.py" + "--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src" + ) + + add_test(roundtriptest_executable + ${PYTHON_EXECUTABLE} + "${CMAKE_CURRENT_SOURCE_DIR}/roundtrip_tests.py" + "--spec" "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt" + "--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src" + ) + + add_test(entity_executable + ${PYTHON_EXECUTABLE} + "${CMAKE_CURRENT_SOURCE_DIR}/entity_tests.py" + "--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src" + ) + endif() add_test(spectest_executable ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt" "--program" "${CMAKE_CURRENT_BINARY_DIR}/../src/cmark" @@ -46,13 +63,6 @@ IF (PYTHONINTERP_FOUND) ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_CURRENT_SOURCE_DIR}/smart_punct.txt" "--program" "${CMAKE_CURRENT_BINARY_DIR}/../src/cmark --smart" ) - add_test(roundtriptest_executable - ${PYTHON_EXECUTABLE} - "${CMAKE_CURRENT_SOURCE_DIR}/roundtrip_tests.py" - "--spec" "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt" - "--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src" - ) - add_test(regressiontest_executable ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" @@ -60,11 +70,6 @@ IF (PYTHONINTERP_FOUND) "${CMAKE_CURRENT_BINARY_DIR}/../src/cmark" ) - add_test(entity_executable - ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/entity_tests.py" - "--library-dir" "${CMAKE_CURRENT_BINARY_DIR}/../src" - ) - ELSE(PYTHONINTERP_FOUND) message("\n*** A python 3 interpreter is required to run the spec tests.\n") |