Bram Moolenaar | 46acad7 | 2023-06-11 19:04:18 +0100 | [diff] [blame] | 1 | # Portable Makefile for running syntax tests. |
| 2 | |
| 3 | # Override this if needed, e.g. with ../../src/vim |
| 4 | VIMPROG = vim |
| 5 | |
| 6 | # "runtime" relative to "runtime/syntax/testdir" |
| 7 | VIMRUNTIME = ../.. |
| 8 | |
| 9 | # Uncomment this line to use valgrind for memory leaks and extra warnings. |
| 10 | # VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=45 --log-file=valgrind.$* |
| 11 | |
| 12 | # ENVVARS = LC_ALL=C LANG=C LANGUAGE=C |
| 13 | |
K.Takata | d5b952a | 2023-06-13 22:44:57 +0100 | [diff] [blame] | 14 | RUN_VIMTEST = VIMRUNTIME=$(VIMRUNTIME) $(VALGRIND) $(ENVVARS) ../$(VIMPROG) -f $(GUI_FLAG) |
Bram Moolenaar | 46acad7 | 2023-06-11 19:04:18 +0100 | [diff] [blame] | 15 | |
| 16 | # Run the tests that didn't run yet or failed previously. |
| 17 | # If a test succeeds a testdir/done/{name} file will be written. |
| 18 | # If a test fails a testdir/failed/{name}.dump file will be written. |
| 19 | test: |
| 20 | @# the "vimcmd" file is used by the screendump utils |
K.Takata | d5b952a | 2023-06-13 22:44:57 +0100 | [diff] [blame] | 21 | @echo "../$(VIMPROG)" > testdir/vimcmd |
Bram Moolenaar | 46acad7 | 2023-06-11 19:04:18 +0100 | [diff] [blame] | 22 | @echo "$(RUN_VIMTEST)" >> testdir/vimcmd |
| 23 | VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term -u testdir/runtest.vim |
| 24 | |
| 25 | |
| 26 | clean testclean: |
| 27 | rm -f testdir/failed/* testdir/done/* testdir/vimcmd |