Mercurial > vim
comparison src/testdir/Makefile @ 21741:baccf9e06efe v8.2.1420
patch 8.2.1420: test 49 is old style
Commit: https://github.com/vim/vim/commit/f7c4d83609acdfe0e4d0fec9413697ac97c0c3f9
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 11 20:42:19 2020 +0200
patch 8.2.1420: test 49 is old style
Problem: Test 49 is old style.
Solution: Convert remaining parts to new style. Remove obsolete items.
(Yegappan Lakshmanan, closes #6683)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 11 Aug 2020 20:45:05 +0200 |
parents | a35036006352 |
children | 30bdd2e4a6f9 |
comparison
equal
deleted
inserted
replaced
21740:54928f1c0d20 | 21741:baccf9e06efe |
---|---|
21 # VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=25 --log-file=valgrind.$* | 21 # VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=25 --log-file=valgrind.$* |
22 | 22 |
23 default: nongui | 23 default: nongui |
24 | 24 |
25 # The list of tests is common to all systems. | 25 # The list of tests is common to all systems. |
26 # This defines NEW_TESTS, NEW_TESTS_RES, SCRIPTS_ALL, SCRIPTS_MORE* and | 26 # This defines SCRIPTS_FIRST, NEW_TESTS and NEW_TESTS_RES |
27 # SCRIPTS_GUI. | |
28 include Make_all.mak | 27 include Make_all.mak |
29 | 28 |
30 | |
31 SCRIPTS = $(SCRIPTS_ALL) \ | |
32 $(SCRIPTS_MORE1) \ | |
33 $(SCRIPTS_MORE2) \ | |
34 $(SCRIPTS_MORE4) | |
35 | |
36 # Explicit dependencies. | 29 # Explicit dependencies. |
37 test49.out: test49.vim | |
38 | |
39 test_options.res test_alot.res: opt_test.vim | 30 test_options.res test_alot.res: opt_test.vim |
40 | 31 |
41 SCRIPTS_BENCH = test_bench_regexp.res | 32 SCRIPTS_BENCH = test_bench_regexp.res |
42 | 33 |
43 .SUFFIXES: .in .out .res .vim | 34 .SUFFIXES: .in .out .res .vim |
44 | 35 |
45 nongui: nolog $(SCRIPTS_FIRST) $(SCRIPTS) newtests report | 36 nongui: nolog $(SCRIPTS_FIRST) newtests report |
46 | 37 |
47 gui: nolog $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) newtests report | 38 gui: nolog $(SCRIPTS_FIRST) newtests report |
48 | 39 |
49 benchmark: $(SCRIPTS_BENCH) | 40 benchmark: $(SCRIPTS_BENCH) |
50 | 41 |
51 report: | 42 report: |
52 # without the +eval feature test_result.log is a copy of test.log | 43 # without the +eval feature test_result.log is a copy of test.log |
61 @/bin/sh -c "if test -f test.log; \ | 52 @/bin/sh -c "if test -f test.log; \ |
62 then echo TEST FAILURE; exit 1; \ | 53 then echo TEST FAILURE; exit 1; \ |
63 else echo ALL DONE; \ | 54 else echo ALL DONE; \ |
64 fi" | 55 fi" |
65 | 56 |
66 $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS_RES): $(VIMPROG) | 57 $(SCRIPTS_FIRST) $(NEW_TESTS_RES): $(VIMPROG) |
67 | 58 |
68 # Must run test1 first to create small.vim. | 59 # Must run test1 first to create small.vim. |
69 $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS_RES): $(SCRIPTS_FIRST) | 60 $(NEW_TESTS_RES): $(SCRIPTS_FIRST) |
70 | 61 |
71 | 62 |
72 # Execute an individual new style test, e.g.: | 63 # Execute an individual new style test, e.g.: |
73 # make test_largefile | 64 # make test_largefile |
74 $(NEW_TESTS): | 65 $(NEW_TESTS): |
114 else echo; \ | 105 else echo; \ |
115 echo test1 FAILED - Something basic is wrong; \ | 106 echo test1 FAILED - Something basic is wrong; \ |
116 echo; exit 1; fi" | 107 echo; exit 1; fi" |
117 -rm -rf X* viminfo | 108 -rm -rf X* viminfo |
118 | 109 |
119 .in.out: | |
120 -rm -rf $*.failed test.ok $(RM_ON_RUN) | |
121 cp $*.ok test.ok | |
122 # Sleep a moment to avoid that the xterm title is messed up. | |
123 # 200 msec is sufficient, but only modern sleep supports a fraction of | |
124 # a second, fall back to a second if it fails. | |
125 @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1" | |
126 $(RUN_VIM) $*.in $(REDIR_TEST_TO_NULL) | |
127 | |
128 # For flaky tests retry one time. No tests at the moment. | |
129 #@/bin/sh -c "if test -f test.out -a $* = test61; then \ | |
130 # if diff test.out $*.ok; \ | |
131 # then echo flaky test ok first time; \ | |
132 # else rm -rf $*.failed $(RM_ON_RUN); \ | |
133 # $(RUN_VIM) $*.in; \ | |
134 # fi \ | |
135 # fi" | |
136 | |
137 # Check if the test.out file matches test.ok. | |
138 @/bin/sh -c "if test -f test.out; then \ | |
139 if diff test.out $*.ok; \ | |
140 then mv -f test.out $*.out; \ | |
141 else echo $* FAILED >>test.log; mv -f test.out $*.failed; \ | |
142 fi \ | |
143 else echo $* NO OUTPUT >>test.log; \ | |
144 fi" | |
145 @/bin/sh -c "if test -f valgrind; then\ | |
146 mv -f valgrind valgrind.$*; \ | |
147 fi" | |
148 -rm -rf X* test.ok viminfo | |
149 | |
150 nolog: | 110 nolog: |
151 -rm -f test.log messages | 111 -rm -f test.log messages |
152 | 112 |
153 | 113 |
154 # New style of tests uses Vim script with assert calls. These are easier | 114 # New style of tests uses Vim script with assert calls. These are easier |