Skip to content

Commit d53ebfc

Browse files
committed
patch 8.1.2196: MS-Windows: running tests with MSVC lacks updates
Problem: MS-Windows: running tests with MSVC lacks updates. Solution: Improve running individual tests on MS-Windows. (closes #4922)
1 parent 4d14bac commit d53ebfc

3 files changed

Lines changed: 38 additions & 8 deletions

File tree

src/Make_mvc.mak

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,17 @@ MAIN_TARGET = $(GVIM).exe $(VIM).exe $(VIMDLLBASE).dll
12791279
MAIN_TARGET = $(VIM).exe
12801280
!endif
12811281

1282+
# Target to run individual tests.
1283+
VIMTESTTARGET = $(VIM).exe
1284+
1285+
OLD_TEST_OUTFILES = \
1286+
$(SCRIPTS_FIRST) \
1287+
$(SCRIPTS_ALL) \
1288+
$(SCRIPTS_MORE1) \
1289+
$(SCRIPTS_MORE4) \
1290+
$(SCRIPTS_WIN32) \
1291+
$(SCRIPTS_GUI)
1292+
12821293
all: $(MAIN_TARGET) \
12831294
vimrun.exe \
12841295
install.exe \
@@ -1370,7 +1381,7 @@ tags: notags
13701381
notags:
13711382
- if exist tags del tags
13721383

1373-
clean:
1384+
clean: testclean
13741385
- if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR)
13751386
- if exist *.obj del *.obj
13761387
- if exist $(VIM).exe del $(VIM).exe
@@ -1405,7 +1416,6 @@ clean:
14051416
cd GvimExt
14061417
$(MAKE) /NOLOGO -f Makefile clean
14071418
cd ..
1408-
- if exist testdir\*.out del testdir\*.out
14091419

14101420
test:
14111421
cd testdir
@@ -1422,13 +1432,24 @@ testclean:
14221432
$(MAKE) /NOLOGO -f Make_dos.mak clean
14231433
cd ..
14241434

1435+
# Run individual OLD style test.
1436+
# These do not depend on the executable, compile it when needed.
1437+
$(OLD_TEST_OUTFILES:.out=):
1438+
cd testdir
1439+
1440+
$(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) nolog
1441+
$(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) [email protected]
1442+
@ if exist test.log ( type test.log & exit /b 1 )
1443+
cd ..
1444+
1445+
# Run individual NEW style test.
1446+
# These do not depend on the executable, compile it when needed.
14251447
$(NEW_TESTS):
14261448
cd testdir
14271449
- if exist $@.res del $@.res
1428-
$(MAKE) /NOLOGO -f Make_dos.mak nolog
1429-
$(MAKE) /NOLOGO -f Make_dos.mak $@.res
1430-
$(MAKE) /NOLOGO -f Make_dos.mak report
1431-
type messages
1450+
$(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) nolog
1451+
$(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) $@.res
1452+
$(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) report
14321453
cd ..
14331454

14341455
###########################################################################

src/testdir/Make_dos.mak

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,14 @@ $(TEST_OUTFILES): $(DOSTMP)\$(*B).in
6969
$(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
7070

7171
report:
72-
@echo ""
72+
@rem without the +eval feature test_result.log is a copy of test.log
73+
@if exist test.log ( copy /y test.log test_result.log > nul ) \
74+
else ( echo No failures reported > test_result.log )
75+
$(VIMPROG) -u NONE $(NO_INITS) -S summarize.vim messages
76+
@echo.
7377
@echo Test results:
74-
@if exist test.log ( type test.log & echo TEST FAILURE & exit /b 1 ) \
78+
@type test_result.log
79+
@if exist test.log ( echo TEST FAILURE & exit /b 1 ) \
7580
else ( echo ALL DONE )
7681

7782
clean:
@@ -92,12 +97,14 @@ clean:
9297
-for /d %i in (X*) do @rmdir /s/q %i
9398
-if exist viminfo del viminfo
9499
-if exist test.log del test.log
100+
-if exist test_result.log del test_result.log
95101
-if exist messages del messages
96102
-if exist benchmark.out del benchmark.out
97103
-if exist opt_test.vim del opt_test.vim
98104

99105
nolog:
100106
-if exist test.log del test.log
107+
-if exist test_result.log del test_result.log
101108
-if exist messages del messages
102109

103110
benchmark:

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
2196,
744746
/**/
745747
2195,
746748
/**/

0 commit comments

Comments
 (0)