annotate src/testdir/Makefile @ 35127:f28efb331bcd default tip

runtime(doc): add MsgArea to 'highlight' option description Commit: https://github.com/vim/vim/commit/fb745756db23c5500294ba3f8ef48ef18080f247 Author: Christian Brabandt <cb@256bit.org> Date: Tue May 7 21:19:03 2024 +0200 runtime(doc): add MsgArea to 'highlight' option description Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Tue, 07 May 2024 21:30:03 +0200
parents 7e93120ed584
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 #
1326
22886f3d882d updated for version 7.1-040
vimboss
parents: 856
diff changeset
2 # Makefile to run all tests for Vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 #
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4
7313
2062247be2d0 commit https://github.com/vim/vim/commit/3f12a2421bda43a4e48c822541b75f72ee11125a
Christian Brabandt <cb@256bit.org>
parents: 7293
diff changeset
5 # Use console or GUI.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 VIMPROG = ../vim
13634
2678e38e1de6 patch 8.0.1689: no tests for xxd
Christian Brabandt <cb@256bit.org>
parents: 12662
diff changeset
7 XXDPROG = ../xxd/xxd
7313
2062247be2d0 commit https://github.com/vim/vim/commit/3f12a2421bda43a4e48c822541b75f72ee11125a
Christian Brabandt <cb@256bit.org>
parents: 7293
diff changeset
8 # VIMPROG = ../gvim
2062247be2d0 commit https://github.com/vim/vim/commit/3f12a2421bda43a4e48c822541b75f72ee11125a
Christian Brabandt <cb@256bit.org>
parents: 7293
diff changeset
9
5774
0a295a3c9e47 updated for version 7.4.231
Bram Moolenaar <bram@vim.org>
parents: 5716
diff changeset
10 SCRIPTSOURCE = ../../runtime
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
14889
ba1f0c06b4be patch 8.1.0456: running test hangs when the input file is being edited
Bram Moolenaar <Bram@vim.org>
parents: 14824
diff changeset
12 # Comment out this line to see the verbose output of tests.
ba1f0c06b4be patch 8.1.0456: running test hangs when the input file is being edited
Bram Moolenaar <Bram@vim.org>
parents: 14824
diff changeset
13 #
ba1f0c06b4be patch 8.1.0456: running test hangs when the input file is being edited
Bram Moolenaar <Bram@vim.org>
parents: 14824
diff changeset
14 # Catches SwapExists to avoid hanging at the ATTENTION prompt.
30449
55aa44dd59ef patch 9.0.0560: elapsed time since testing started is not visible
Bram Moolenaar <Bram@vim.org>
parents: 30419
diff changeset
15 REDIR_TEST_TO_NULL = --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C LANG=C LANGUAGE=C awk '/Executing Test_/{match($$0, "([0-9][0-9]:[0-9][0-9] *)?Executing Test_[^\\)]*\\)"); print substr($$0, RSTART, RLENGTH) "\r"; fflush()}'
14824
845180495796 patch 8.1.0424: test output is very verbose, loading CI log is slow
Christian Brabandt <cb@256bit.org>
parents: 14802
diff changeset
16
1920
3dfff6a80088 updated for version 7.2-217
vimboss
parents: 1839
diff changeset
17 # Uncomment this line to use valgrind for memory leaks and extra warnings.
3dfff6a80088 updated for version 7.2-217
vimboss
parents: 1839
diff changeset
18 # The output goes into a file "valgrind.testN"
3dfff6a80088 updated for version 7.2-217
vimboss
parents: 1839
diff changeset
19 # Vim should be compiled with EXITFREE to avoid false warnings.
3dfff6a80088 updated for version 7.2-217
vimboss
parents: 1839
diff changeset
20 # This will make testing about 10 times as slow.
32295
bea4ebf594c6 patch 9.0.1479: small source file problems; outdated list of distrib. files
Bram Moolenaar <Bram@vim.org>
parents: 30449
diff changeset
21 # VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=45 --log-file=valgrind.$*
1357
4dd75cfd946f updated for version 7.1-071
vimboss
parents: 1326
diff changeset
22
30419
f652823ce8bb patch 9.0.0545: when a test is slow and CI times out there is no time info
Bram Moolenaar <Bram@vim.org>
parents: 29128
diff changeset
23 # To execute one test, e.g. in gdb, use something like this:
f652823ce8bb patch 9.0.0545: when a test is slow and CI times out there is no time info
Bram Moolenaar <Bram@vim.org>
parents: 29128
diff changeset
24 # run -f -u unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S runtest.vim test_name.vim
f652823ce8bb patch 9.0.0545: when a test is slow and CI times out there is no time info
Bram Moolenaar <Bram@vim.org>
parents: 29128
diff changeset
25
7366
eec1dc8ca160 commit https://github.com/vim/vim/commit/40bbceee2213a6fa8fdc1d3f3920d61fb5370803
Christian Brabandt <cb@256bit.org>
parents: 7356
diff changeset
26 default: nongui
2607
2f57d93bdbf6 updated for version 7.3.030
Bram Moolenaar <bram@vim.org>
parents: 2579
diff changeset
27
7354
81dc9e30aad6 commit https://github.com/vim/vim/commit/7b6156f4cd4027b664a916ba546e9b05d4c49e11
Christian Brabandt <cb@256bit.org>
parents: 7350
diff changeset
28 # The list of tests is common to all systems.
21779
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
29 # This defines SCRIPTS_TINY_OUT, NEW_TESTS and NEW_TESTS_RES.
7354
81dc9e30aad6 commit https://github.com/vim/vim/commit/7b6156f4cd4027b664a916ba546e9b05d4c49e11
Christian Brabandt <cb@256bit.org>
parents: 7350
diff changeset
30 include Make_all.mak
81dc9e30aad6 commit https://github.com/vim/vim/commit/7b6156f4cd4027b664a916ba546e9b05d4c49e11
Christian Brabandt <cb@256bit.org>
parents: 7350
diff changeset
31
15432
b10ce9e77128 patch 8.1.0724: build for MinGW fails
Bram Moolenaar <Bram@vim.org>
parents: 15430
diff changeset
32 # Explicit dependencies.
b10ce9e77128 patch 8.1.0724: build for MinGW fails
Bram Moolenaar <Bram@vim.org>
parents: 15430
diff changeset
33 test_options.res test_alot.res: opt_test.vim
b10ce9e77128 patch 8.1.0724: build for MinGW fails
Bram Moolenaar <Bram@vim.org>
parents: 15430
diff changeset
34
7277
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
35 .SUFFIXES: .in .out .res .vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
21779
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
37 nongui: nolog tinytests newtests report
1717
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
38
21779
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
39 gui: nolog tinytests newtests report
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
40
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
41 tiny: nolog tinytests report
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
6328
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
43 benchmark: $(SCRIPTS_BENCH)
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
44
1717
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
45 report:
24701
4f4960861583 patch 8.2.2889: typo and verbose comment in Makefiles
Bram Moolenaar <Bram@vim.org>
parents: 24178
diff changeset
46 @# without the +eval feature test_result.log is a copy of test.log
16955
54c2fe0eff03 patch 8.1.1478: still an error when running tests with the tiny version
Bram Moolenaar <Bram@vim.org>
parents: 16951
diff changeset
47 @/bin/sh -c "if test -f test.log; \
54c2fe0eff03 patch 8.1.1478: still an error when running tests with the tiny version
Bram Moolenaar <Bram@vim.org>
parents: 16951
diff changeset
48 then cp test.log test_result.log; \
54c2fe0eff03 patch 8.1.1478: still an error when running tests with the tiny version
Bram Moolenaar <Bram@vim.org>
parents: 16951
diff changeset
49 else echo No failures reported > test_result.log; \
54c2fe0eff03 patch 8.1.1478: still an error when running tests with the tiny version
Bram Moolenaar <Bram@vim.org>
parents: 16951
diff changeset
50 fi"
18530
41b2506c7662 patch 8.1.2259: running tests may leave XfakeHOME behind
Bram Moolenaar <Bram@vim.org>
parents: 18378
diff changeset
51 $(VIMPROG) -u NONE $(NO_INITS) -S summarize.vim messages $(REDIR_TEST_TO_NULL)
30449
55aa44dd59ef patch 9.0.0560: elapsed time since testing started is not visible
Bram Moolenaar <Bram@vim.org>
parents: 30419
diff changeset
52 @rm -f starttime
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 @echo
1717
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
54 @echo 'Test results:'
16951
ebdf6cd89910 patch 8.1.1476: no statistics displayed after running tests
Bram Moolenaar <Bram@vim.org>
parents: 15922
diff changeset
55 @cat test_result.log
1717
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
56 @/bin/sh -c "if test -f test.log; \
16951
ebdf6cd89910 patch 8.1.1476: no statistics displayed after running tests
Bram Moolenaar <Bram@vim.org>
parents: 15922
diff changeset
57 then echo TEST FAILURE; exit 1; \
1717
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
58 else echo ALL DONE; \
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
59 fi"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
21779
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
61 $(SCRIPTS_TINY_OUT) $(NEW_TESTS_RES): $(VIMPROG)
15430
d94901eeb762 patch 8.1.0723: cannot easily run specific test when in src/testdir
Bram Moolenaar <Bram@vim.org>
parents: 14889
diff changeset
62
d94901eeb762 patch 8.1.0723: cannot easily run specific test when in src/testdir
Bram Moolenaar <Bram@vim.org>
parents: 14889
diff changeset
63
d94901eeb762 patch 8.1.0723: cannot easily run specific test when in src/testdir
Bram Moolenaar <Bram@vim.org>
parents: 14889
diff changeset
64 # Execute an individual new style test, e.g.:
d94901eeb762 patch 8.1.0723: cannot easily run specific test when in src/testdir
Bram Moolenaar <Bram@vim.org>
parents: 14889
diff changeset
65 # make test_largefile
d94901eeb762 patch 8.1.0723: cannot easily run specific test when in src/testdir
Bram Moolenaar <Bram@vim.org>
parents: 14889
diff changeset
66 $(NEW_TESTS):
30449
55aa44dd59ef patch 9.0.0560: elapsed time since testing started is not visible
Bram Moolenaar <Bram@vim.org>
parents: 30419
diff changeset
67 rm -f $@.res $(CLEANUP_FILES)
19465
07627d1b4d8c patch 8.2.0290: running individual test differs from all tests
Bram Moolenaar <Bram@vim.org>
parents: 18530
diff changeset
68 @MAKEFLAGS=--no-print-directory $(MAKE) -f Makefile $@.res VIMPROG=$(VIMPROG) XXDPROG=$(XXDPROG) SCRIPTSOURCE=$(SCRIPTSOURCE)
18378
f2dac4c32f75 patch 8.1.2183: running a test is a bit verbose
Bram Moolenaar <Bram@vim.org>
parents: 18066
diff changeset
69 @cat messages
15430
d94901eeb762 patch 8.1.0723: cannot easily run specific test when in src/testdir
Bram Moolenaar <Bram@vim.org>
parents: 14889
diff changeset
70 @if test -f test.log; then \
16980
f3a6c2c31551 patch 8.1.1490: when a single test fails the exit code is not set
Bram Moolenaar <Bram@vim.org>
parents: 16957
diff changeset
71 exit 1; \
15430
d94901eeb762 patch 8.1.0723: cannot easily run specific test when in src/testdir
Bram Moolenaar <Bram@vim.org>
parents: 14889
diff changeset
72 fi
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
19942
b471038ec3ea patch 8.2.0527: Vim9: function types insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19465
diff changeset
74 # Run only tests specific for Vim9 script
b471038ec3ea patch 8.2.0527: Vim9: function types insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19465
diff changeset
75 test_vim9:
30449
55aa44dd59ef patch 9.0.0560: elapsed time since testing started is not visible
Bram Moolenaar <Bram@vim.org>
parents: 30419
diff changeset
76 rm -f test_vim9_*.res $(CLEANUP_FILES)
19942
b471038ec3ea patch 8.2.0527: Vim9: function types insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19465
diff changeset
77 @MAKEFLAGS=--no-print-directory $(MAKE) -f Makefile $(TEST_VIM9_RES) VIMPROG=$(VIMPROG) XXDPROG=$(XXDPROG) SCRIPTSOURCE=$(SCRIPTSOURCE)
b471038ec3ea patch 8.2.0527: Vim9: function types insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19465
diff changeset
78 @cat messages
30449
55aa44dd59ef patch 9.0.0560: elapsed time since testing started is not visible
Bram Moolenaar <Bram@vim.org>
parents: 30419
diff changeset
79 @rm -f starttime
19942
b471038ec3ea patch 8.2.0527: Vim9: function types insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19465
diff changeset
80 @MAKEFLAGS=--no-print-directory $(MAKE) -f Makefile report VIMPROG=$(VIMPROG) XXDPROG=$(XXDPROG) SCRIPTSOURCE=$(SCRIPTSOURCE)
b471038ec3ea patch 8.2.0527: Vim9: function types insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19465
diff changeset
81 @if test -f test.log; then \
b471038ec3ea patch 8.2.0527: Vim9: function types insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19465
diff changeset
82 exit 1; \
b471038ec3ea patch 8.2.0527: Vim9: function types insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19465
diff changeset
83 fi
b471038ec3ea patch 8.2.0527: Vim9: function types insufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19465
diff changeset
84
3992
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
85 RM_ON_RUN = test.out X* viminfo
21779
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
86 RM_ON_START = test.ok benchmark.out
17391
8a43873df941 patch 8.1.1694: the RUN_VIM variable is longer than needed
Bram Moolenaar <Bram@vim.org>
parents: 17276
diff changeset
87 RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE) $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -u unix.vim $(NO_INITS) -s dotest.in
3992
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
88
18066
8e10cabcde8a patch 8.1.2028: options test script does not work
Bram Moolenaar <Bram@vim.org>
parents: 17391
diff changeset
89 # Delete files that may interfere with running tests. This includes some files
8e10cabcde8a patch 8.1.2028: options test script does not work
Bram Moolenaar <Bram@vim.org>
parents: 17391
diff changeset
90 # that may result from working on the tests, not only from running them.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 clean:
34829
7e93120ed584 patch 9.1.0284: make testclean is not able to delete failed screendumps
Christian Brabandt <cb@256bit.org>
parents: 32295
diff changeset
92 -rm -rf *.out *.failed *.res *.rej *.orig XfakeHOME Xdir1 Xfind failed
30449
55aa44dd59ef patch 9.0.0560: elapsed time since testing started is not visible
Bram Moolenaar <Bram@vim.org>
parents: 30419
diff changeset
93 -rm -f opt_test.vim test_result.log $(CLEANUP_FILES)
28879
73d490493dc6 patch 8.2.4962: files show up in git status
Bram Moolenaar <Bram@vim.org>
parents: 24701
diff changeset
94 -rm -rf $(RM_ON_RUN) $(RM_ON_START)
17010
9d9b637b35a9 patch 8.1.1505: running "make clean" twice gives errors
Bram Moolenaar <Bram@vim.org>
parents: 16980
diff changeset
95 -rm -f valgrind.*
20132
cb0990a07084 patch 8.2.0621: after running tests asan files may remain
Bram Moolenaar <Bram@vim.org>
parents: 20120
diff changeset
96 -rm -f asan.*
29128
d8a962d7b008 patch 8.2.5084: when the GUI shows a dialog tests get stuck
Bram Moolenaar <Bram@vim.org>
parents: 29018
diff changeset
97 -rm -f guidialog guidialogfile
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
29018
4a7650a894d4 patch 8.2.5031: cannot easily run the benchmarks
Bram Moolenaar <Bram@vim.org>
parents: 28879
diff changeset
99 # Delete the files produced by benchmarking, so they can run again.
4a7650a894d4 patch 8.2.5031: cannot easily run the benchmarks
Bram Moolenaar <Bram@vim.org>
parents: 28879
diff changeset
100 benchmarkclean:
4a7650a894d4 patch 8.2.5031: cannot easily run the benchmarks
Bram Moolenaar <Bram@vim.org>
parents: 28879
diff changeset
101 rm -f $(SCRIPTS_BENCH)
4a7650a894d4 patch 8.2.5031: cannot easily run the benchmarks
Bram Moolenaar <Bram@vim.org>
parents: 28879
diff changeset
102
21779
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
103 nolog:
30449
55aa44dd59ef patch 9.0.0560: elapsed time since testing started is not visible
Bram Moolenaar <Bram@vim.org>
parents: 30419
diff changeset
104 -rm -f test_result.log $(CLEANUP_FILES)
21779
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
105
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
106
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
107 # Tiny tests. Works even without the +eval feature.
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
108 tinytests: $(SCRIPTS_TINY_OUT)
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
109
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
110 .in.out:
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
111 -rm -rf $*.failed test.ok $(RM_ON_RUN)
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
112 cp $*.ok test.ok
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
113 @# Sleep a moment to avoid that the xterm title is messed up.
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
114 @# 200 msec is sufficient, but only modern sleep supports a fraction of
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
115 @# a second, fall back to a second if it fails.
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
116 @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
14824
845180495796 patch 8.1.0424: test output is very verbose, loading CI log is slow
Christian Brabandt <cb@256bit.org>
parents: 14802
diff changeset
117 $(RUN_VIM) $*.in $(REDIR_TEST_TO_NULL)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
21779
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
119 @# Check if the test.out file matches test.ok.
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
120 @/bin/sh -c "if test -f test.out; then \
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
121 if diff test.out $*.ok; \
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
122 then mv -f test.out $*.out; \
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
123 else echo $* FAILED >>test.log; mv -f test.out $*.failed; \
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
124 fi \
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
125 else echo $* NO OUTPUT >>test.log; \
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
126 fi"
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
127 @/bin/sh -c "if test -f valgrind; then\
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
128 mv -f valgrind valgrind.$*; \
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
129 fi"
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
130 -rm -rf X* test.ok viminfo
7277
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
131
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
132
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
133 # New style of tests uses Vim script with assert calls. These are easier
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
134 # to write and a lot easier to read and debug.
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
135 # Limitation: Only works with the +eval feature.
29128
d8a962d7b008 patch 8.2.5084: when the GUI shows a dialog tests get stuck
Bram Moolenaar <Bram@vim.org>
parents: 29018
diff changeset
136 # Add --gui-dialog-file to avoid getting stuck in a dialog.
d8a962d7b008 patch 8.2.5084: when the GUI shows a dialog tests get stuck
Bram Moolenaar <Bram@vim.org>
parents: 29018
diff changeset
137 RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE) $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -u unix.vim --gui-dialog-file guidialog
7277
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
138
7506
cfc0d60f6233 commit https://github.com/vim/vim/commit/e7893a4088d6ea796bcab6195d232cb26c12c317
Christian Brabandt <cb@256bit.org>
parents: 7372
diff changeset
139 newtests: newtestssilent
21951
3ece5c9fe811 patch 8.2.1525: messages from tests were not always displayed
Bram Moolenaar <Bram@vim.org>
parents: 21783
diff changeset
140 @/bin/sh -c "if test -f messages; then cat messages; fi"
7506
cfc0d60f6233 commit https://github.com/vim/vim/commit/e7893a4088d6ea796bcab6195d232cb26c12c317
Christian Brabandt <cb@256bit.org>
parents: 7372
diff changeset
141
15430
d94901eeb762 patch 8.1.0723: cannot easily run specific test when in src/testdir
Bram Moolenaar <Bram@vim.org>
parents: 14889
diff changeset
142 newtestssilent: $(NEW_TESTS_RES)
7506
cfc0d60f6233 commit https://github.com/vim/vim/commit/e7893a4088d6ea796bcab6195d232cb26c12c317
Christian Brabandt <cb@256bit.org>
parents: 7372
diff changeset
143
7277
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
144
15922
0d6331501d19 patch 8.1.0967: stray dependency in test Makefile
Bram Moolenaar <Bram@vim.org>
parents: 15881
diff changeset
145 .vim.res:
12602
9359ed49d375 patch 8.0.1179: Test_popup_and_window_resize() does not always pass
Christian Brabandt <cb@256bit.org>
parents: 11119
diff changeset
146 @echo "$(VIMPROG)" > vimcmd
9359ed49d375 patch 8.0.1179: Test_popup_and_window_resize() does not always pass
Christian Brabandt <cb@256bit.org>
parents: 11119
diff changeset
147 @echo "$(RUN_VIMTEST)" >> vimcmd
14824
845180495796 patch 8.1.0424: test output is very verbose, loading CI log is slow
Christian Brabandt <cb@256bit.org>
parents: 14802
diff changeset
148 $(RUN_VIMTEST) $(NO_INITS) -S runtest.vim $*.vim $(REDIR_TEST_TO_NULL)
9778
4360b2b46125 commit https://github.com/vim/vim/commit/66459b7c98c67f8a9d39de8f08e8e8f1fca0e359
Christian Brabandt <cb@256bit.org>
parents: 9719
diff changeset
149 @rm vimcmd
10944
4e2cdce4576c patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents: 10765
diff changeset
150
4e2cdce4576c patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents: 10765
diff changeset
151 test_gui.res: test_gui.vim
12602
9359ed49d375 patch 8.0.1179: Test_popup_and_window_resize() does not always pass
Christian Brabandt <cb@256bit.org>
parents: 11119
diff changeset
152 @echo "$(VIMPROG)" > vimcmd
9359ed49d375 patch 8.0.1179: Test_popup_and_window_resize() does not always pass
Christian Brabandt <cb@256bit.org>
parents: 11119
diff changeset
153 @echo "$(RUN_GVIMTEST)" >> vimcmd
10944
4e2cdce4576c patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents: 10765
diff changeset
154 $(RUN_VIMTEST) -u NONE $(NO_INITS) -S runtest.vim $<
4e2cdce4576c patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents: 10765
diff changeset
155 @rm vimcmd
4e2cdce4576c patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents: 10765
diff changeset
156
4e2cdce4576c patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents: 10765
diff changeset
157 test_gui_init.res: test_gui_init.vim
12602
9359ed49d375 patch 8.0.1179: Test_popup_and_window_resize() does not always pass
Christian Brabandt <cb@256bit.org>
parents: 11119
diff changeset
158 @echo "$(VIMPROG)" > vimcmd
9359ed49d375 patch 8.0.1179: Test_popup_and_window_resize() does not always pass
Christian Brabandt <cb@256bit.org>
parents: 11119
diff changeset
159 @echo "$(RUN_GVIMTEST_WITH_GVIMRC)" >> vimcmd
11119
d8a550329a97 patch 8.0.0447: getting font name does not work on X11
Christian Brabandt <cb@256bit.org>
parents: 11083
diff changeset
160 $(RUN_VIMTEST) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $<
10944
4e2cdce4576c patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents: 10765
diff changeset
161 @rm vimcmd
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents: 10944
diff changeset
162
18066
8e10cabcde8a patch 8.1.2028: options test script does not work
Bram Moolenaar <Bram@vim.org>
parents: 17391
diff changeset
163 opt_test.vim: ../optiondefs.h gen_opt_test.vim
8e10cabcde8a patch 8.1.2028: options test script does not work
Bram Moolenaar <Bram@vim.org>
parents: 17391
diff changeset
164 $(VIMPROG) -u NONE -S gen_opt_test.vim --noplugin --not-a-term ../optiondefs.h
13634
2678e38e1de6 patch 8.0.1689: no tests for xxd
Christian Brabandt <cb@256bit.org>
parents: 12662
diff changeset
165
2678e38e1de6 patch 8.0.1689: no tests for xxd
Christian Brabandt <cb@256bit.org>
parents: 12662
diff changeset
166 test_xxd.res:
2678e38e1de6 patch 8.0.1689: no tests for xxd
Christian Brabandt <cb@256bit.org>
parents: 12662
diff changeset
167 XXD=$(XXDPROG); export XXD; $(RUN_VIMTEST) $(NO_INITS) -S runtest.vim test_xxd.vim
20120
16460964c304 patch 8.2.0615: regexp benchmark stest is old style
Bram Moolenaar <Bram@vim.org>
parents: 19942
diff changeset
168
16460964c304 patch 8.2.0615: regexp benchmark stest is old style
Bram Moolenaar <Bram@vim.org>
parents: 19942
diff changeset
169 test_bench_regexp.res: test_bench_regexp.vim
16460964c304 patch 8.2.0615: regexp benchmark stest is old style
Bram Moolenaar <Bram@vim.org>
parents: 19942
diff changeset
170 -rm -rf benchmark.out $(RM_ON_RUN)
21779
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
171 @# Sleep a moment to avoid that the xterm title is messed up.
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
172 @# 200 msec is sufficient, but only modern sleep supports a fraction of
30bdd2e4a6f9 patch 8.2.1439: tiny and small builds have no test coverage
Bram Moolenaar <Bram@vim.org>
parents: 21741
diff changeset
173 @# a second, fall back to a second if it fails.
20120
16460964c304 patch 8.2.0615: regexp benchmark stest is old style
Bram Moolenaar <Bram@vim.org>
parents: 19942
diff changeset
174 @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
16460964c304 patch 8.2.0615: regexp benchmark stest is old style
Bram Moolenaar <Bram@vim.org>
parents: 19942
diff changeset
175 $(RUN_VIMTEST) $(NO_INITS) -S runtest.vim $*.vim $(REDIR_TEST_TO_NULL)
16460964c304 patch 8.2.0615: regexp benchmark stest is old style
Bram Moolenaar <Bram@vim.org>
parents: 19942
diff changeset
176 @/bin/sh -c "if test -f benchmark.out; then cat benchmark.out; fi"