comparison src/testdir/Make_dos.mak @ 21779:30bdd2e4a6f9 v8.2.1439

patch 8.2.1439: tiny and small builds have no test coverage Commit: https://github.com/vim/vim/commit/b96a32ef1a95dd4ebf9413d686bccb1b4645f74b Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 13 18:59:55 2020 +0200 patch 8.2.1439: tiny and small builds have no test coverage Problem: Tiny and small builds have no test coverage. Solution: Restore tests that do not depend on the +eval feature. (Ken Takata, closes #6696)
author Bram Moolenaar <Bram@vim.org>
date Thu, 13 Aug 2020 19:15:04 +0200
parents baccf9e06efe
children e529f06721f9
comparison
equal deleted inserted replaced
21778:cc500536c15e 21779:30bdd2e4a6f9
7 7
8 default: nongui 8 default: nongui
9 9
10 !include Make_all.mak 10 !include Make_all.mak
11 11
12 TEST_OUTFILES = $(SCRIPTS_FIRST) 12 # Explicit dependencies.
13 test_options.res test_alot.res: opt_test.vim
14
15 TEST_OUTFILES = $(SCRIPTS_TINY_OUT)
13 DOSTMP = dostmp 16 DOSTMP = dostmp
14 DOSTMP_OUTFILES = $(TEST_OUTFILES:test=dostmp\test) 17 DOSTMP_OUTFILES = $(TEST_OUTFILES:test=dostmp\test)
15 DOSTMP_INFILES = $(DOSTMP_OUTFILES:.out=.in) 18 DOSTMP_INFILES = $(DOSTMP_OUTFILES:.out=.in)
16 19
17 .SUFFIXES: .in .out .res .vim 20 .SUFFIXES: .in .out .res .vim
18 21
19 nongui: nolog $(SCRIPTS_FIRST) newtests report 22 nongui: nolog tinytests newtests report
20 23
21 small: nolog report 24 gui: nolog tinytests newtests report
22 25
23 gui: nolog $(SCRIPTS_FIRST) newtests report 26 tiny: nolog tinytests report
24 27
25 win32: nolog $(SCRIPTS_FIRST) newtests report 28 benchmark: $(SCRIPTS_BENCH)
29
30 report:
31 @rem without the +eval feature test_result.log is a copy of test.log
32 @if exist test.log ( copy /y test.log test_result.log > nul ) \
33 else ( echo No failures reported > test_result.log )
34 $(VIMPROG) -u NONE $(NO_INITS) -S summarize.vim messages
35 @echo.
36 @echo Test results:
37 @cmd /c type test_result.log
38 @if exist test.log ( echo TEST FAILURE & exit /b 1 ) \
39 else ( echo ALL DONE )
40
41
42 # Execute an individual new style test, e.g.:
43 # nmake -f Make_dos.mak test_largefile
44 $(NEW_TESTS):
45 -if exist $@.res del $@.res
46 -if exist test.log del test.log
47 -if exist messages del messages
48 @$(MAKE) -nologo -f Make_dos.mak $@.res VIMPROG=$(VIMPROG)
49 @type messages
50 @if exist test.log exit 1
51
52
53 # Delete files that may interfere with running tests. This includes some files
54 # that may result from working on the tests, not only from running them.
55 clean:
56 -if exist *.out $(DEL) *.out
57 -if exist *.failed $(DEL) *.failed
58 -if exist *.res $(DEL) *.res
59 -if exist $(DOSTMP) rd /s /q $(DOSTMP)
60 -if exist test.in del test.in
61 -if exist test.ok del test.ok
62 -if exist small.vim del small.vim
63 -if exist tiny.vim del tiny.vim
64 -if exist mbyte.vim del mbyte.vim
65 -if exist mzscheme.vim del mzscheme.vim
66 -if exist Xdir1 rd /s /q Xdir1
67 -if exist Xfind rd /s /q Xfind
68 -if exist XfakeHOME rd /s /q XfakeHOME
69 -if exist X* $(DEL) X*
70 -for /d %i in (X*) do @rd /s/q %i
71 -if exist viminfo del viminfo
72 -if exist test.log del test.log
73 -if exist test_result.log del test_result.log
74 -if exist messages del messages
75 -if exist benchmark.out del benchmark.out
76 -if exist opt_test.vim del opt_test.vim
77
78 nolog:
79 -if exist test.log del test.log
80 -if exist test_result.log del test_result.log
81 -if exist messages del messages
82
83
84 # Tiny tests. Works even without the +eval feature.
85 tinytests: $(SCRIPTS_TINY_OUT)
26 86
27 # Copy the input files to dostmp, changing the fileformat to dos. 87 # Copy the input files to dostmp, changing the fileformat to dos.
28 $(DOSTMP_INFILES): $(*B).in 88 $(DOSTMP_INFILES): $(*B).in
29 if not exist $(DOSTMP)\NUL md $(DOSTMP) 89 if not exist $(DOSTMP)\NUL md $(DOSTMP)
30 if exist $@ del $@ 90 if exist $@ del $@
53 ( move /y test.out $*.failed > nul \ 113 ( move /y test.out $*.failed > nul \
54 & del $(DOSTMP)\$(*B).out \ 114 & del $(DOSTMP)\$(*B).out \
55 & echo $* FAILED >> test.log ) \ 115 & echo $* FAILED >> test.log ) \
56 else ( move /y test.out $*.out > nul ) 116 else ( move /y test.out $*.out > nul )
57 117
58 # Must run test1 first to create small.vim.
59 # This rule must come after the one that copies the input files to dostmp to
60 # allow for running an individual test.
61 $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
62
63 report:
64 @rem without the +eval feature test_result.log is a copy of test.log
65 @if exist test.log ( copy /y test.log test_result.log > nul ) \
66 else ( echo No failures reported > test_result.log )
67 $(VIMPROG) -u NONE $(NO_INITS) -S summarize.vim messages
68 @echo.
69 @echo Test results:
70 @cmd /c type test_result.log
71 @if exist test.log ( echo TEST FAILURE & exit /b 1 ) \
72 else ( echo ALL DONE )
73
74 clean:
75 -del *.out
76 -del *.failed
77 -del *.res
78 -if exist $(DOSTMP) rd /s /q $(DOSTMP)
79 -if exist test.in del test.in
80 -if exist test.ok del test.ok
81 -if exist small.vim del small.vim
82 -if exist tiny.vim del tiny.vim
83 -if exist mbyte.vim del mbyte.vim
84 -if exist mzscheme.vim del mzscheme.vim
85 -if exist Xdir1 rd /s /q Xdir1
86 -if exist Xfind rd /s /q Xfind
87 -if exist XfakeHOME rd /s /q XfakeHOME
88 -del X*
89 -for /d %i in (X*) do @rmdir /s/q %i
90 -if exist viminfo del viminfo
91 -if exist test.log del test.log
92 -if exist test_result.log del test_result.log
93 -if exist messages del messages
94 -if exist benchmark.out del benchmark.out
95 -if exist opt_test.vim del opt_test.vim
96
97 nolog:
98 -if exist test.log del test.log
99 -if exist test_result.log del test_result.log
100 -if exist messages del messages
101
102 benchmark: test_bench_regexp.res
103
104 test_bench_regexp.res: test_bench_regexp.vim
105 -if exist benchmark.out del benchmark.out
106 @echo $(VIMPROG) > vimcmd
107 $(VIMPROG) -u NONE $(NO_INITS) -S runtest.vim $*.vim
108 @del vimcmd
109 @IF EXIST benchmark.out ( type benchmark.out )
110 118
111 # New style of tests uses Vim script with assert calls. These are easier 119 # New style of tests uses Vim script with assert calls. These are easier
112 # to write and a lot easier to read and debug. 120 # to write and a lot easier to read and debug.
113 # Limitation: Only works with the +eval feature. 121 # Limitation: Only works with the +eval feature.
114 122
130 test_gui_init.res: test_gui_init.vim 138 test_gui_init.res: test_gui_init.vim
131 @echo $(VIMPROG) > vimcmd 139 @echo $(VIMPROG) > vimcmd
132 $(VIMPROG) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $*.vim 140 $(VIMPROG) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $*.vim
133 @del vimcmd 141 @del vimcmd
134 142
135 test_options.res test_alot.res: opt_test.vim
136
137 opt_test.vim: ../optiondefs.h gen_opt_test.vim 143 opt_test.vim: ../optiondefs.h gen_opt_test.vim
138 $(VIMPROG) -u NONE -S gen_opt_test.vim --noplugin --not-a-term ../optiondefs.h 144 $(VIMPROG) -u NONE -S gen_opt_test.vim --noplugin --not-a-term ../optiondefs.h
145
146 test_bench_regexp.res: test_bench_regexp.vim
147 -if exist benchmark.out del benchmark.out
148 @echo $(VIMPROG) > vimcmd
149 $(VIMPROG) -u NONE $(NO_INITS) -S runtest.vim $*.vim
150 @del vimcmd
151 @IF EXIST benchmark.out ( type benchmark.out )