diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-24 21:13:50 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-24 21:13:50 -0800 |
commit | 1caeda5b537c5cd30f4fc2bf078a00265473894c (patch) | |
tree | 0d88f3230f5703dd002b307d4715d7ad7b41a67e | |
parent | be19ec302584732eca18de162a7eaf5d8649379e (diff) |
Moved spec.txt to test/ directory.
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | test/CMakeLists.txt | 4 | ||||
-rw-r--r-- | test/spec.txt (renamed from spec.txt) | 0 | ||||
-rwxr-xr-x | test/spec_tests.py | 2 |
4 files changed, 5 insertions, 5 deletions
@@ -4,7 +4,7 @@ BUILDDIR?=build GENERATOR?=Unix Makefiles MINGW_BUILDDIR?=build-mingw MINGW_INSTALLDIR?=windows -SPEC=spec.txt +SPEC=test/spec.txt SITE=_site SPECVERSION=$(shell perl -ne 'print $$1 if /^version: *([0-9.]+)/' $(SPEC)) FUZZCHARS?=2000000 # for fuzztest @@ -82,7 +82,7 @@ $(SRCDIR)/scanners.c: $(SRCDIR)/scanners.re test: $(SPEC) cmake_build make -C $(BUILDDIR) test || (cat $(BUILDDIR)/Testing/Temporary/LastTest.log && exit 1) -$(ALLTESTS): spec.txt +$(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]))' > $@ leakcheck: $(ALLTESTS) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 11a27c6..0fba1b3 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -27,7 +27,7 @@ IF (PYTHONINTERP_FOUND) add_test(spectest_library ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" - "${CMAKE_SOURCE_DIR}/spec.txt" "--library-dir" "${CMAKE_BINARY_DIR}/src" + "${CMAKE_SOURCE_DIR}/test/spec.txt" "--library-dir" "${CMAKE_BINARY_DIR}/src" ) add_test(pathological_tests_library @@ -36,7 +36,7 @@ IF (PYTHONINTERP_FOUND) ) add_test(spectest_executable - ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_SOURCE_DIR}/spec.txt" "--program" "${CMAKE_BINARY_DIR}/src/cmark" + ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_SOURCE_DIR}/test/spec.txt" "--program" "${CMAKE_BINARY_DIR}/src/cmark" ) ELSE(PYTHONINTERP_FOUND) diff --git a/test/spec_tests.py b/test/spec_tests.py index cc676be..b1b0373 100755 --- a/test/spec_tests.py +++ b/test/spec_tests.py @@ -13,7 +13,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser(description='Run cmark tests.') parser.add_argument('-p', '--program', dest='program', nargs='?', default=None, help='program to test') - parser.add_argument('-s', '--spec', dest='spec', nargs='?', default='spec.txt', + parser.add_argument('-s', '--spec', dest='spec', nargs='?', default='test/spec.txt', help='path to spec') parser.add_argument('-P', '--pattern', dest='pattern', nargs='?', default=None, help='limit to sections matching regex pattern') |