Mercurial > vim
annotate src/testdir/Makefile @ 9772:560291211303 v7.4.2161
commit https://github.com/vim/vim/commit/7ab6defcafe017a3ad58580a3e56dab705b1ed8b
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 5 22:51:13 2016 +0200
patch 7.4.2161
Problem: Expression test fails without conceal feature.
Solution: Only check "conceal" with the conceal feature.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 05 Aug 2016 23:00:07 +0200 |
parents | 219dbe63ad2a |
children | 4360b2b46125 |
rev | line source |
---|---|
7 | 1 # |
1326 | 2 # Makefile to run all tests for Vim |
7 | 3 # |
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 | 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 | 9 SCRIPTSOURCE = ../../runtime |
7 | 10 |
1920 | 11 # Uncomment this line to use valgrind for memory leaks and extra warnings. |
12 # The output goes into a file "valgrind.testN" | |
13 # Vim should be compiled with EXITFREE to avoid false warnings. | |
14 # This will make testing about 10 times as slow. | |
9137
8b2d6447fb6a
commit https://github.com/vim/vim/commit/af6c12c27bcb553b2fb2c8a9dcfde626fb3670fe
Christian Brabandt <cb@256bit.org>
parents:
8253
diff
changeset
|
15 # VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=25 --log-file=valgrind.$* |
1357 | 16 |
7366
eec1dc8ca160
commit https://github.com/vim/vim/commit/40bbceee2213a6fa8fdc1d3f3920d61fb5370803
Christian Brabandt <cb@256bit.org>
parents:
7356
diff
changeset
|
17 default: nongui |
2607 | 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 | 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 | 29 |
6328 | 30 SCRIPTS_BENCH = bench_re_freeze.out |
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 | 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 | 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 | 37 |
6328 | 38 benchmark: $(SCRIPTS_BENCH) |
39 | |
1717 | 40 report: |
7 | 41 @echo |
1717 | 42 @echo 'Test results:' |
43 @/bin/sh -c "if test -f test.log; \ | |
44 then cat test.log; echo TEST FAILURE; exit 1; \ | |
45 else echo ALL DONE; \ | |
46 fi" | |
7 | 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 | 52 |
3992 | 53 RM_ON_RUN = test.out X* viminfo |
6328 | 54 RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok benchmark.out |
9137
8b2d6447fb6a
commit https://github.com/vim/vim/commit/af6c12c27bcb553b2fb2c8a9dcfde626fb3670fe
Christian Brabandt <cb@256bit.org>
parents:
8253
diff
changeset
|
55 RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -u unix.vim $(NO_PLUGIN) -s dotest.in |
3992 | 56 |
7 | 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 | 59 |
60 test1.out: test1.in | |
5363 | 61 -rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) wrongtermsize |
3992 | 62 $(RUN_VIM) $*.in |
5702 | 63 @/bin/sh -c "if test -f wrongtermsize; \ |
5363 | 64 then echo; \ |
65 echo test1 FAILED - terminal size must be 80x24 or larger; \ | |
66 echo; exit 1; \ | |
67 elif diff test.out $*.ok; \ | |
7 | 68 then mv -f test.out $*.out; \ |
69 else echo; \ | |
70 echo test1 FAILED - Something basic is wrong; \ | |
71 echo; exit 1; fi" | |
72 -rm -rf X* viminfo | |
73 | |
74 .in.out: | |
3992 | 75 -rm -rf $*.failed test.ok $(RM_ON_RUN) |
7 | 76 cp $*.ok test.ok |
4313 | 77 # Sleep a moment to avoid that the xterm title is messed up. |
78 # 200 msec is sufficient, but only modern sleep supports a fraction of | |
79 # a second, fall back to a second if it fails. | |
80 @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1" | |
3992 | 81 -$(RUN_VIM) $*.in |
82 | |
9719
219dbe63ad2a
commit https://github.com/vim/vim/commit/89eaa4185efacab253b23a182c1c8a7bbf1096c9
Christian Brabandt <cb@256bit.org>
parents:
9137
diff
changeset
|
83 # For flaky tests retry one time. No tests at the moment. |
219dbe63ad2a
commit https://github.com/vim/vim/commit/89eaa4185efacab253b23a182c1c8a7bbf1096c9
Christian Brabandt <cb@256bit.org>
parents:
9137
diff
changeset
|
84 #@/bin/sh -c "if test -f test.out -a $* = test61; then \ |
219dbe63ad2a
commit https://github.com/vim/vim/commit/89eaa4185efacab253b23a182c1c8a7bbf1096c9
Christian Brabandt <cb@256bit.org>
parents:
9137
diff
changeset
|
85 # if diff test.out $*.ok; \ |
219dbe63ad2a
commit https://github.com/vim/vim/commit/89eaa4185efacab253b23a182c1c8a7bbf1096c9
Christian Brabandt <cb@256bit.org>
parents:
9137
diff
changeset
|
86 # then echo flaky test ok first time; \ |
219dbe63ad2a
commit https://github.com/vim/vim/commit/89eaa4185efacab253b23a182c1c8a7bbf1096c9
Christian Brabandt <cb@256bit.org>
parents:
9137
diff
changeset
|
87 # else rm -rf $*.failed $(RM_ON_RUN); \ |
219dbe63ad2a
commit https://github.com/vim/vim/commit/89eaa4185efacab253b23a182c1c8a7bbf1096c9
Christian Brabandt <cb@256bit.org>
parents:
9137
diff
changeset
|
88 # $(RUN_VIM) $*.in; \ |
219dbe63ad2a
commit https://github.com/vim/vim/commit/89eaa4185efacab253b23a182c1c8a7bbf1096c9
Christian Brabandt <cb@256bit.org>
parents:
9137
diff
changeset
|
89 # fi \ |
219dbe63ad2a
commit https://github.com/vim/vim/commit/89eaa4185efacab253b23a182c1c8a7bbf1096c9
Christian Brabandt <cb@256bit.org>
parents:
9137
diff
changeset
|
90 # fi" |
3992 | 91 |
92 # Check if the test.out file matches test.ok. | |
4444 | 93 @/bin/sh -c "if test -f test.out; then \ |
169 | 94 if diff test.out $*.ok; \ |
95 then mv -f test.out $*.out; \ | |
96 else echo $* FAILED >>test.log; mv -f test.out $*.failed; \ | |
97 fi \ | |
98 else echo $* NO OUTPUT >>test.log; \ | |
7 | 99 fi" |
4444 | 100 @/bin/sh -c "if test -f valgrind; then\ |
101 mv -f valgrind valgrind.$*; \ | |
102 fi" | |
3855 | 103 -rm -rf X* test.ok viminfo |
7 | 104 |
6328 | 105 bench_re_freeze.out: bench_re_freeze.vim |
106 -rm -rf benchmark.out $(RM_ON_RUN) | |
107 # Sleep a moment to avoid that the xterm title is messed up. | |
108 # 200 msec is sufficient, but only modern sleep supports a fraction of | |
109 # a second, fall back to a second if it fails. | |
110 @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1" | |
111 -$(RUN_VIM) $*.in | |
112 @/bin/sh -c "if test -f benchmark.out; then cat benchmark.out; fi" | |
113 | |
7 | 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. |
9137
8b2d6447fb6a
commit https://github.com/vim/vim/commit/af6c12c27bcb553b2fb2c8a9dcfde626fb3670fe
Christian Brabandt <cb@256bit.org>
parents:
8253
diff
changeset
|
121 RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -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 |