annotate src/testdir/Makefile @ 8368:db2a07b710ed v7.4.1476

commit https://github.com/vim/vim/commit/f1d2501ebe33e148886c2914acd33140e20ee222 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 3 12:22:53 2016 +0100 patch 7.4.1476 Problem: Function arguments marked as unused while they are not. Solution: Remove UNUSED. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Thu, 03 Mar 2016 12:30:05 +0100
parents 1b6a589a0efc
children 8b2d6447fb6a
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
7313
2062247be2d0 commit https://github.com/vim/vim/commit/3f12a2421bda43a4e48c822541b75f72ee11125a
Christian Brabandt <cb@256bit.org>
parents: 7293
diff changeset
7 # VIMPROG = ../gvim
2062247be2d0 commit https://github.com/vim/vim/commit/3f12a2421bda43a4e48c822541b75f72ee11125a
Christian Brabandt <cb@256bit.org>
parents: 7293
diff changeset
8
5774
0a295a3c9e47 updated for version 7.4.231
Bram Moolenaar <bram@vim.org>
parents: 5716
diff changeset
9 SCRIPTSOURCE = ../../runtime
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
1920
3dfff6a80088 updated for version 7.2-217
vimboss
parents: 1839
diff changeset
11 # Uncomment this line to use valgrind for memory leaks and extra warnings.
3dfff6a80088 updated for version 7.2-217
vimboss
parents: 1839
diff changeset
12 # The output goes into a file "valgrind.testN"
3dfff6a80088 updated for version 7.2-217
vimboss
parents: 1839
diff changeset
13 # Vim should be compiled with EXITFREE to avoid false warnings.
3dfff6a80088 updated for version 7.2-217
vimboss
parents: 1839
diff changeset
14 # This will make testing about 10 times as slow.
3dfff6a80088 updated for version 7.2-217
vimboss
parents: 1839
diff changeset
15 # VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=15 --log-file=valgrind.$*
1357
4dd75cfd946f updated for version 7.1-071
vimboss
parents: 1326
diff changeset
16
7366
eec1dc8ca160 commit https://github.com/vim/vim/commit/40bbceee2213a6fa8fdc1d3f3920d61fb5370803
Christian Brabandt <cb@256bit.org>
parents: 7356
diff changeset
17 default: nongui
2607
2f57d93bdbf6 updated for version 7.3.030
Bram Moolenaar <bram@vim.org>
parents: 2579
diff changeset
18
7354
81dc9e30aad6 commit https://github.com/vim/vim/commit/7b6156f4cd4027b664a916ba546e9b05d4c49e11
Christian Brabandt <cb@256bit.org>
parents: 7350
diff changeset
19 # The list of tests is common to all systems.
81dc9e30aad6 commit https://github.com/vim/vim/commit/7b6156f4cd4027b664a916ba546e9b05d4c49e11
Christian Brabandt <cb@256bit.org>
parents: 7350
diff changeset
20 # This defines NEW_TESTS, SCRIPTS_ALL, SCRIPTS_MORE* and SCRIPTS_GUI.
81dc9e30aad6 commit https://github.com/vim/vim/commit/7b6156f4cd4027b664a916ba546e9b05d4c49e11
Christian Brabandt <cb@256bit.org>
parents: 7350
diff changeset
21 include Make_all.mak
81dc9e30aad6 commit https://github.com/vim/vim/commit/7b6156f4cd4027b664a916ba546e9b05d4c49e11
Christian Brabandt <cb@256bit.org>
parents: 7350
diff changeset
22
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
7354
81dc9e30aad6 commit https://github.com/vim/vim/commit/7b6156f4cd4027b664a916ba546e9b05d4c49e11
Christian Brabandt <cb@256bit.org>
parents: 7350
diff changeset
24 SCRIPTS = $(SCRIPTS_ALL) \
81dc9e30aad6 commit https://github.com/vim/vim/commit/7b6156f4cd4027b664a916ba546e9b05d4c49e11
Christian Brabandt <cb@256bit.org>
parents: 7350
diff changeset
25 $(SCRIPTS_MORE1) \
81dc9e30aad6 commit https://github.com/vim/vim/commit/7b6156f4cd4027b664a916ba546e9b05d4c49e11
Christian Brabandt <cb@256bit.org>
parents: 7350
diff changeset
26 $(SCRIPTS_MORE2) \
81dc9e30aad6 commit https://github.com/vim/vim/commit/7b6156f4cd4027b664a916ba546e9b05d4c49e11
Christian Brabandt <cb@256bit.org>
parents: 7350
diff changeset
27 $(SCRIPTS_MORE3) \
81dc9e30aad6 commit https://github.com/vim/vim/commit/7b6156f4cd4027b664a916ba546e9b05d4c49e11
Christian Brabandt <cb@256bit.org>
parents: 7350
diff changeset
28 $(SCRIPTS_MORE4)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
6328
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
30 SCRIPTS_BENCH = bench_re_freeze.out
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
31
7277
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
32 .SUFFIXES: .in .out .res .vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
7356
f0eb9aa9eb32 commit https://github.com/vim/vim/commit/a60824308cd9bc192c5d38fc16cccfcf652b40f6
Christian Brabandt <cb@256bit.org>
parents: 7354
diff changeset
34 nongui: nolog $(SCRIPTS_FIRST) $(SCRIPTS) newtests report
1717
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
35
7356
f0eb9aa9eb32 commit https://github.com/vim/vim/commit/a60824308cd9bc192c5d38fc16cccfcf652b40f6
Christian Brabandt <cb@256bit.org>
parents: 7354
diff changeset
36 gui: nolog $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) newtests report
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
6328
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
38 benchmark: $(SCRIPTS_BENCH)
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
39
1717
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
40 report:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 @echo
1717
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
42 @echo 'Test results:'
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
43 @/bin/sh -c "if test -f test.log; \
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
44 then cat test.log; echo TEST FAILURE; exit 1; \
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
45 else echo ALL DONE; \
e03cb9499b83 updated for version 7.2-015
vimboss
parents: 1624
diff changeset
46 fi"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
7356
f0eb9aa9eb32 commit https://github.com/vim/vim/commit/a60824308cd9bc192c5d38fc16cccfcf652b40f6
Christian Brabandt <cb@256bit.org>
parents: 7354
diff changeset
48 $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS): $(VIMPROG)
f0eb9aa9eb32 commit https://github.com/vim/vim/commit/a60824308cd9bc192c5d38fc16cccfcf652b40f6
Christian Brabandt <cb@256bit.org>
parents: 7354
diff changeset
49
f0eb9aa9eb32 commit https://github.com/vim/vim/commit/a60824308cd9bc192c5d38fc16cccfcf652b40f6
Christian Brabandt <cb@256bit.org>
parents: 7354
diff changeset
50 # Must run test1 first to create small.vim.
f0eb9aa9eb32 commit https://github.com/vim/vim/commit/a60824308cd9bc192c5d38fc16cccfcf652b40f6
Christian Brabandt <cb@256bit.org>
parents: 7354
diff changeset
51 $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS): $(SCRIPTS_FIRST)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3992
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
53 RM_ON_RUN = test.out X* viminfo
6328
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
54 RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok benchmark.out
8253
1b6a589a0efc commit https://github.com/vim/vim/commit/49c39ff678e2ba9f7dc280b25368e12084a610cf
Christian Brabandt <cb@256bit.org>
parents: 7645
diff changeset
55 RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -f -u unix.vim $(NO_PLUGIN) -s dotest.in
3992
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
56
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 clean:
7372
6b057079a836 commit https://github.com/vim/vim/commit/096c8bb40d51b22a4b1d761baf7bb79fb9e55a28
Christian Brabandt <cb@256bit.org>
parents: 7366
diff changeset
58 -rm -rf *.out *.failed *.res *.rej *.orig test.log messages $(RM_ON_RUN) $(RM_ON_START) valgrind.*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 test1.out: test1.in
5363
91f6a28e010d updated for version 7.4.033
Bram Moolenaar <bram@vim.org>
parents: 5351
diff changeset
61 -rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) wrongtermsize
3992
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
62 $(RUN_VIM) $*.in
5702
1ed6acdbfef5 updated for version 7.4.196
Bram Moolenaar <bram@vim.org>
parents: 5690
diff changeset
63 @/bin/sh -c "if test -f wrongtermsize; \
5363
91f6a28e010d updated for version 7.4.033
Bram Moolenaar <bram@vim.org>
parents: 5351
diff changeset
64 then echo; \
91f6a28e010d updated for version 7.4.033
Bram Moolenaar <bram@vim.org>
parents: 5351
diff changeset
65 echo test1 FAILED - terminal size must be 80x24 or larger; \
91f6a28e010d updated for version 7.4.033
Bram Moolenaar <bram@vim.org>
parents: 5351
diff changeset
66 echo; exit 1; \
91f6a28e010d updated for version 7.4.033
Bram Moolenaar <bram@vim.org>
parents: 5351
diff changeset
67 elif diff test.out $*.ok; \
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 then mv -f test.out $*.out; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 else echo; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 echo test1 FAILED - Something basic is wrong; \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 echo; exit 1; fi"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 -rm -rf X* viminfo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 .in.out:
3992
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
75 -rm -rf $*.failed test.ok $(RM_ON_RUN)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 cp $*.ok test.ok
4313
ff1f3e42df08 updated for version 7.3.906
Bram Moolenaar <bram@vim.org>
parents: 4274
diff changeset
77 # Sleep a moment to avoid that the xterm title is messed up.
ff1f3e42df08 updated for version 7.3.906
Bram Moolenaar <bram@vim.org>
parents: 4274
diff changeset
78 # 200 msec is sufficient, but only modern sleep supports a fraction of
ff1f3e42df08 updated for version 7.3.906
Bram Moolenaar <bram@vim.org>
parents: 4274
diff changeset
79 # a second, fall back to a second if it fails.
ff1f3e42df08 updated for version 7.3.906
Bram Moolenaar <bram@vim.org>
parents: 4274
diff changeset
80 @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
3992
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
81 -$(RUN_VIM) $*.in
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
82
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
83 # For flaky tests retry one time.
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
84 @/bin/sh -c "if test -f test.out -a $* = test61; then \
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
85 if diff test.out $*.ok; \
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
86 then echo flaky test ok first time; \
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
87 else rm -rf $*.failed $(RM_ON_RUN); \
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
88 $(RUN_VIM) $*.in; \
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
89 fi \
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
90 fi"
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
91
d149f18b289f updated for version 7.3.751
Bram Moolenaar <bram@vim.org>
parents: 3986
diff changeset
92 # Check if the test.out file matches test.ok.
4444
ccecb03e5e8b updated for version 7.3.970
Bram Moolenaar <bram@vim.org>
parents: 4313
diff changeset
93 @/bin/sh -c "if test -f test.out; then \
169
0e902b8f511f updated for version 7.0051
vimboss
parents: 120
diff changeset
94 if diff test.out $*.ok; \
0e902b8f511f updated for version 7.0051
vimboss
parents: 120
diff changeset
95 then mv -f test.out $*.out; \
0e902b8f511f updated for version 7.0051
vimboss
parents: 120
diff changeset
96 else echo $* FAILED >>test.log; mv -f test.out $*.failed; \
0e902b8f511f updated for version 7.0051
vimboss
parents: 120
diff changeset
97 fi \
0e902b8f511f updated for version 7.0051
vimboss
parents: 120
diff changeset
98 else echo $* NO OUTPUT >>test.log; \
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 fi"
4444
ccecb03e5e8b updated for version 7.3.970
Bram Moolenaar <bram@vim.org>
parents: 4313
diff changeset
100 @/bin/sh -c "if test -f valgrind; then\
ccecb03e5e8b updated for version 7.3.970
Bram Moolenaar <bram@vim.org>
parents: 4313
diff changeset
101 mv -f valgrind valgrind.$*; \
ccecb03e5e8b updated for version 7.3.970
Bram Moolenaar <bram@vim.org>
parents: 4313
diff changeset
102 fi"
3855
1cc37b8cfaa1 updated for version 7.3.684
Bram Moolenaar <bram@vim.org>
parents: 3618
diff changeset
103 -rm -rf X* test.ok viminfo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
6328
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
105 bench_re_freeze.out: bench_re_freeze.vim
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
106 -rm -rf benchmark.out $(RM_ON_RUN)
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
107 # Sleep a moment to avoid that the xterm title is messed up.
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
108 # 200 msec is sufficient, but only modern sleep supports a fraction of
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
109 # a second, fall back to a second if it fails.
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
110 @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
111 -$(RUN_VIM) $*.in
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
112 @/bin/sh -c "if test -f benchmark.out; then cat benchmark.out; fi"
adfbffe1e642 updated for version 7.4.497
Bram Moolenaar <bram@vim.org>
parents: 6307
diff changeset
113
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 nolog:
7372
6b057079a836 commit https://github.com/vim/vim/commit/096c8bb40d51b22a4b1d761baf7bb79fb9e55a28
Christian Brabandt <cb@256bit.org>
parents: 7366
diff changeset
115 -rm -f test.log messages
7277
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
116
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
117
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
118 # 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
119 # 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
120 # Limitation: Only works with the +eval feature.
8253
1b6a589a0efc commit https://github.com/vim/vim/commit/49c39ff678e2ba9f7dc280b25368e12084a610cf
Christian Brabandt <cb@256bit.org>
parents: 7645
diff changeset
121 RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -f -u unix.vim $(NO_PLUGIN)
7277
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
122
7506
cfc0d60f6233 commit https://github.com/vim/vim/commit/e7893a4088d6ea796bcab6195d232cb26c12c317
Christian Brabandt <cb@256bit.org>
parents: 7372
diff changeset
123 newtests: newtestssilent
cfc0d60f6233 commit https://github.com/vim/vim/commit/e7893a4088d6ea796bcab6195d232cb26c12c317
Christian Brabandt <cb@256bit.org>
parents: 7372
diff changeset
124 @/bin/sh -c "if test -f messages && grep -q 'FAILED' messages; then cat messages && cat test.log; fi"
cfc0d60f6233 commit https://github.com/vim/vim/commit/e7893a4088d6ea796bcab6195d232cb26c12c317
Christian Brabandt <cb@256bit.org>
parents: 7372
diff changeset
125
cfc0d60f6233 commit https://github.com/vim/vim/commit/e7893a4088d6ea796bcab6195d232cb26c12c317
Christian Brabandt <cb@256bit.org>
parents: 7372
diff changeset
126 newtestssilent: $(NEW_TESTS)
cfc0d60f6233 commit https://github.com/vim/vim/commit/e7893a4088d6ea796bcab6195d232cb26c12c317
Christian Brabandt <cb@256bit.org>
parents: 7372
diff changeset
127
7277
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
128
6600871bb38c commit https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
Christian Brabandt <cb@256bit.org>
parents: 7275
diff changeset
129 .vim.res:
7645
1529ae1c456a commit https://github.com/vim/vim/commit/42c9cfa7f4d2f176234e385573ff2fb1f61915e5
Christian Brabandt <cb@256bit.org>
parents: 7506
diff changeset
130 $(RUN_VIMTEST) -u NONE -U NONE -S runtest.vim $*.vim