summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-01-06 13:55:01 +0100
committerGitHub <noreply@github.com>2017-01-06 13:55:01 +0100
commit3894dbddbf4142748bc0dd72c5460b860dd8b5ef (patch)
tree681a8b3b3b6b57cf67c223eee61716b94df732ff /test
parentc786cacc291418d68b52636f951af778fefa214f (diff)
parentc9c18fff2fd8b3d0bef0120fe3db3b6ab0beeb9b (diff)
Merge pull request #179 from winterheart/cmake
CMake impovement
Diffstat (limited to 'test')
-rwxr-xr-xtest/CMakeLists.txt49
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")