- Commit
- 168f8666d4bad5d50ba5bf5a787a28b236754917
- Parent
- 615f055c320ff23a388f342af7ab5810d21f4fb8
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Made roundtrip test part of the test suite run by cmake.
My personal build of CMark ✏️
Made roundtrip test part of the test suite run by cmake.
5 files changed, 13 insertions, 9 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | .travis.yml | 5 | 0 | 5 |
Modified | Makefile | 3 | 0 | 3 |
Modified | test/CMakeLists.txt | 11 | 11 | 0 |
Added | test/roundtrip.bat | 1 | 1 | 0 |
Modified | test/roundtrip.sh | 2 | 1 | 1 |
diff --git a/.travis.yml b/.travis.yml @@ -29,10 +29,5 @@ script: - | if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ] then - make roundtrip_test - fi - - | - if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ] - then make leakcheck fi
diff --git a/Makefile b/Makefile @@ -128,9 +128,6 @@ update-spec: test: $(SPEC) cmake_build make -C $(BUILDDIR) test || (cat $(BUILDDIR)/Testing/Temporary/LastTest.log && exit 1) -roundtrip_test: $(SPEC) cmake_build - python3 test/spec_tests.py --spec $< --prog test/roundtrip.sh - $(ALLTESTS): $(SPEC) python3 test/spec_tests.py --spec $< --dump-tests | python3 -c 'import json; import sys; tests = json.loads(sys.stdin.read()); print("\n".join([test["markdown"] for test in tests]))' > $@
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt @@ -16,6 +16,9 @@ if (WIN32) set_tests_properties(api_test PROPERTIES ENVIRONMENT "PATH=${WIN_DLL_DIR};$ENV{PATH}" ) + set(ROUNDTRIP,"${CMAKE_CURRENT_SOURCE_DIR}/roundtrip.bat") +else(WIN32) + set(ROUNDTRIP,"${CMAKE_CURRENT_SOURCE_DIR}/roundtrip.sh") endif(WIN32) IF (PYTHONINTERP_FOUND) @@ -43,6 +46,14 @@ 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}/spec_tests.py" "--no-normalize" + "--spec" "${CMAKE_CURRENT_SOURCE_DIR}/spec.txt" "--program" + "${ROUNDTRIP} ${CMAKE_CURRENT_BINARY_DIR}/../src/cmark" + ) + + ELSE(PYTHONINTERP_FOUND) message("\n*** A python 3 interpreter is required to run the spec tests.\n")