comparison src/testdir/Make_dos.mak @ 30170:ba9d53c7c509 v9.0.0421

patch 9.0.0421: MS-Windows makefiles are inconsistently named Commit: https://github.com/vim/vim/commit/5bc13453b2dd8067597793e32c4f94aa3031054a Author: K.Takata <kentkt@csc.jp> Date: Fri Sep 9 10:52:47 2022 +0100 patch 9.0.0421: MS-Windows makefiles are inconsistently named Problem: MS-Windows makefiles are inconsistently named. Solution: Use consistent names. (Ken Takata, closes https://github.com/vim/vim/issues/11088)
author Bram Moolenaar <Bram@vim.org>
date Fri, 09 Sep 2022 12:00:09 +0200
parents d8a962d7b008
children
comparison
equal deleted inserted replaced
30169:28feb6ed144b 30170:ba9d53c7c509
1 # 1 !message Make_dos.mak is deprecated. Use Make_mvc.mak instead.
2 # Makefile to run all tests for Vim, on Dos-like machines. 2 !message
3 #
4 # Requires a set of Unix tools: echo, diff, etc.
5 3
6 VIMPROG = ..\\vim 4 !include Make_mvc.mak
7
8 default: nongui
9
10 !include Make_all.mak
11
12 # Explicit dependencies.
13 test_options.res test_alot.res: opt_test.vim
14
15 TEST_OUTFILES = $(SCRIPTS_TINY_OUT)
16 DOSTMP = dostmp
17 DOSTMP_OUTFILES = $(TEST_OUTFILES:test=dostmp\test)
18 DOSTMP_INFILES = $(DOSTMP_OUTFILES:.out=.in)
19
20 .SUFFIXES: .in .out .res .vim
21
22 # Add --gui-dialog-file to avoid getting stuck in a dialog.
23 COMMON_ARGS = $(NO_INITS) --gui-dialog-file guidialog
24
25 nongui: nolog tinytests newtests report
26
27 gui: nolog tinytests newtests report
28
29 tiny: nolog tinytests report
30
31 benchmark: $(SCRIPTS_BENCH)
32
33 report:
34 @rem without the +eval feature test_result.log is a copy of test.log
35 @if exist test.log ( copy /y test.log test_result.log > nul ) \
36 else ( echo No failures reported > test_result.log )
37 $(VIMPROG) -u NONE $(COMMON_ARGS) -S summarize.vim messages
38 @echo.
39 @echo Test results:
40 @cmd /c type test_result.log
41 @if exist test.log ( echo TEST FAILURE & exit /b 1 ) \
42 else ( echo ALL DONE )
43
44
45 # Execute an individual new style test, e.g.:
46 # nmake -f Make_dos.mak test_largefile
47 $(NEW_TESTS):
48 -if exist $@.res del $@.res
49 -if exist test.log del test.log
50 -if exist messages del messages
51 @$(MAKE) -nologo -f Make_dos.mak $@.res VIMPROG=$(VIMPROG)
52 @type messages
53 @if exist test.log exit 1
54
55
56 # Delete files that may interfere with running tests. This includes some files
57 # that may result from working on the tests, not only from running them.
58 clean:
59 -if exist *.out del *.out
60 -if exist *.failed del *.failed
61 -if exist *.res del *.res
62 -if exist $(DOSTMP) rd /s /q $(DOSTMP)
63 -if exist test.in del test.in
64 -if exist test.ok del test.ok
65 -if exist Xdir1 rd /s /q Xdir1
66 -if exist Xfind rd /s /q Xfind
67 -if exist XfakeHOME rd /s /q XfakeHOME
68 -if exist X* del X*
69 -for /d %i in (X*) do @rd /s/q %i
70 -if exist viminfo del viminfo
71 -if exist test.log del test.log
72 -if exist test_result.log del test_result.log
73 -if exist messages del messages
74 -if exist benchmark.out del benchmark.out
75 -if exist opt_test.vim del opt_test.vim
76 -if exist guidialog del guidialog
77 -if exist guidialogfile del guidialogfile
78
79 nolog:
80 -if exist test.log del test.log
81 -if exist test_result.log del test_result.log
82 -if exist messages del messages
83
84
85 # Tiny tests. Works even without the +eval feature.
86 tinytests: $(SCRIPTS_TINY_OUT)
87
88 # Copy the input files to dostmp, changing the fileformat to dos.
89 $(DOSTMP_INFILES): $(*B).in
90 if not exist $(DOSTMP)\NUL md $(DOSTMP)
91 if exist $@ del $@
92 $(VIMPROG) -u dos.vim $(COMMON_ARGS) "+set ff=dos|f $@|wq" $(*B).in
93
94 # For each input file dostmp/test99.in run the tests.
95 # This moves test99.in to test99.in.bak temporarily.
96 $(TEST_OUTFILES): $(DOSTMP)\$(*B).in
97 -@if exist test.out DEL test.out
98 -@if exist $(DOSTMP)\$(*B).out DEL $(DOSTMP)\$(*B).out
99 move $(*B).in $(*B).in.bak > nul
100 copy $(DOSTMP)\$(*B).in $(*B).in > nul
101 copy $(*B).ok test.ok > nul
102 $(VIMPROG) -u dos.vim $(COMMON_ARGS) -s dotest.in $(*B).in
103 -@if exist test.out MOVE /y test.out $(DOSTMP)\$(*B).out > nul
104 -@if exist $(*B).in.bak move /y $(*B).in.bak $(*B).in > nul
105 -@if exist test.ok del test.ok
106 -@if exist Xdir1 rd /s /q Xdir1
107 -@if exist Xfind rd /s /q Xfind
108 -@if exist XfakeHOME rd /s /q XfakeHOME
109 -@del X*
110 -@if exist viminfo del viminfo
111 $(VIMPROG) -u dos.vim $(COMMON_ARGS) "+set ff=unix|f test.out|wq" \
112 $(DOSTMP)\$(*B).out
113 @diff test.out $*.ok & if errorlevel 1 \
114 ( move /y test.out $*.failed > nul \
115 & del $(DOSTMP)\$(*B).out \
116 & echo $* FAILED >> test.log ) \
117 else ( move /y test.out $*.out > nul )
118
119
120 # New style of tests uses Vim script with assert calls. These are easier
121 # to write and a lot easier to read and debug.
122 # Limitation: Only works with the +eval feature.
123
124 newtests: newtestssilent
125 @if exist messages type messages
126
127 newtestssilent: $(NEW_TESTS_RES)
128
129 .vim.res:
130 @echo $(VIMPROG) > vimcmd
131 $(VIMPROG) -u NONE $(COMMON_ARGS) -S runtest.vim $*.vim
132 @del vimcmd
133
134 test_gui.res: test_gui.vim
135 @echo $(VIMPROG) > vimcmd
136 $(VIMPROG) -u NONE $(COMMON_ARGS) -S runtest.vim $*.vim
137 @del vimcmd
138
139 test_gui_init.res: test_gui_init.vim
140 @echo $(VIMPROG) > vimcmd
141 $(VIMPROG) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $*.vim
142 @del vimcmd
143
144 opt_test.vim: ../optiondefs.h gen_opt_test.vim
145 $(VIMPROG) -u NONE -S gen_opt_test.vim --noplugin --not-a-term ../optiondefs.h
146
147 test_bench_regexp.res: test_bench_regexp.vim
148 -if exist benchmark.out del benchmark.out
149 @echo $(VIMPROG) > vimcmd
150 $(VIMPROG) -u NONE $(COMMON_ARGS) -S runtest.vim $*.vim
151 @del vimcmd
152 @IF EXIST benchmark.out ( type benchmark.out )