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