aboutsummaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
blob: 3d90b389a3d8b9b26c0146fde92202bc326a46ee (plain)
  1. # To get verbose output: cmake --build build --target "test" -- ARGS='-V'
  2. find_package(PythonInterp 3 REQUIRED)
  3. set(PYTHON ${PYTHON_EXECUTABLE})
  4. add_test(html_normalization
  5. ${PYTHON} "-m" "doctest"
  6. "${CMAKE_CURRENT_SOURCE_DIR}/normalize.py"
  7. )
  8. add_test(spectest_library
  9. ${PYTHON} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec"
  10. "${CMAKE_SOURCE_DIR}/spec.txt" "--library-dir" "${CMAKE_BINARY_DIR}/src"
  11. )
  12. add_test(pathological_tests_library
  13. ${PYTHON} "${CMAKE_CURRENT_SOURCE_DIR}/pathological_tests.py"
  14. "--library-dir" "${CMAKE_BINARY_DIR}/src"
  15. )
  16. add_test(NAME api_test COMMAND api_test)
  17. if (WIN32)
  18. file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/src WIN_DLL_DIR)
  19. set_tests_properties(api_test PROPERTIES
  20. ENVIRONMENT "PATH=${WIN_DLL_DIR};$ENV{PATH}"
  21. )
  22. endif(WIN32)
  23. add_test(spectest_executable
  24. ${PYTHON} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_SOURCE_DIR}/spec.txt" "--program" "${CMAKE_BINARY_DIR}/src/cmark"
  25. )