blob: a52c7d616e0bd4a05eb69aea5188adb4a4b65f59 [file] [log] [blame]
Bram Moolenaar46acad72023-06-11 19:04:18 +01001# Portable Makefile for running syntax tests.
2
Bram Moolenaar1aa5f1c2023-06-22 21:57:51 +01003# Override this if needed, the default assumes Vim was build in the src dir.
4#VIMPROG = vim
5VIMPROG = ../../src/vim
Bram Moolenaar46acad72023-06-11 19:04:18 +01006
7# "runtime" relative to "runtime/syntax/testdir"
8VIMRUNTIME = ../..
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.Takatad5b952a2023-06-13 22:44:57 +010015RUN_VIMTEST = VIMRUNTIME=$(VIMRUNTIME) $(VALGRIND) $(ENVVARS) ../$(VIMPROG) -f $(GUI_FLAG)
Bram Moolenaar46acad72023-06-11 19:04:18 +010016
Bram Moolenaar1aa5f1c2023-06-22 21:57:51 +010017# Uncomment this line for debugging
18# DEBUGLOG = --log testlog
19
Bram Moolenaar46acad72023-06-11 19:04:18 +010020# 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 Moolenaar1aa5f1c2023-06-22 21:57:51 +010023# Progress and error messages can be found in "testdir/messages".
Bram Moolenaar46acad72023-06-11 19:04:18 +010024test:
25 @# the "vimcmd" file is used by the screendump utils
K.Takatad5b952a2023-06-13 22:44:57 +010026 @echo "../$(VIMPROG)" > testdir/vimcmd
Bram Moolenaar46acad72023-06-11 19:04:18 +010027 @echo "$(RUN_VIMTEST)" >> testdir/vimcmd
Bram Moolenaar1aa5f1c2023-06-22 21:57:51 +010028 VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u testdir/runtest.vim
Bram Moolenaar031d6322023-06-22 22:38:54 +010029 @tail -n 6 testdir/messages
Bram Moolenaar46acad72023-06-11 19:04:18 +010030
31
32clean testclean:
Bram Moolenaar1aa5f1c2023-06-22 21:57:51 +010033 rm -f testdir/failed/* testdir/done/* testdir/vimcmd testdir/messages