aboutsummaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
blob: f08b325434a596a13f70260b785a01730d537de5 (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. if (WIN32)
  5. file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/src WIN_DLL_DIR)
  6. set_tests_properties(api_test PROPERTIES
  7. ENVIRONMENT "PATH=${WIN_DLL_DIR};$ENV{PATH}"
  8. )
  9. endif(WIN32)
  10. add_test(html_normalization
  11. ${PYTHON} "-m" "doctest"
  12. "${CMAKE_CURRENT_SOURCE_DIR}/normalize.py"
  13. )
  14. add_test(spectest_library
  15. ${PYTHON} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec"
  16. "${CMAKE_SOURCE_DIR}/spec.txt" "--library-dir" "${CMAKE_BINARY_DIR}/src"
  17. )
  18. add_test(pathological_tests_library
  19. ${PYTHON} "${CMAKE_CURRENT_SOURCE_DIR}/pathological_tests.py"
  20. "--library-dir" "${CMAKE_BINARY_DIR}/src"
  21. )
  22. add_test(NAME api_test COMMAND api_test)
  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. )