]> granicus.if.org Git - vim/commitdiff
patch 8.1.2196: MS-Windows: running tests with MSVC lacks updates v8.1.2196
authorBram Moolenaar <Bram@vim.org>
Sun, 20 Oct 2019 19:47:20 +0000 (21:47 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 20 Oct 2019 19:47:20 +0000 (21:47 +0200)
Problem:    MS-Windows: running tests with MSVC lacks updates.
Solution:   Improve running individual tests on MS-Windows. (closes #4922)

src/Make_mvc.mak
src/testdir/Make_dos.mak
src/version.c

index 2a0a1a1dae21f42fe8704145790459a653771f84..11058086be389209c854f6665dab31c1ee9c0e1a 100644 (file)
@@ -1279,6 +1279,17 @@ MAIN_TARGET = $(GVIM).exe $(VIM).exe $(VIMDLLBASE).dll
 MAIN_TARGET = $(VIM).exe
 !endif
 
+# Target to run individual tests.
+VIMTESTTARGET = $(VIM).exe
+
+OLD_TEST_OUTFILES = \
+       $(SCRIPTS_FIRST) \
+       $(SCRIPTS_ALL) \
+       $(SCRIPTS_MORE1) \
+       $(SCRIPTS_MORE4) \
+       $(SCRIPTS_WIN32) \
+       $(SCRIPTS_GUI)
+
 all:   $(MAIN_TARGET) \
        vimrun.exe \
        install.exe \
@@ -1370,7 +1381,7 @@ tags: notags
 notags:
        - if exist tags del tags
 
-clean:
+clean: testclean
        - if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR)
        - if exist *.obj del *.obj
        - if exist $(VIM).exe del $(VIM).exe
@@ -1405,7 +1416,6 @@ clean:
        cd GvimExt
        $(MAKE) /NOLOGO -f Makefile clean
        cd ..
-       - if exist testdir\*.out del testdir\*.out
 
 test:
        cd testdir
@@ -1422,13 +1432,24 @@ testclean:
        $(MAKE) /NOLOGO -f Make_dos.mak clean
        cd ..
 
+# Run individual OLD style test.
+# These do not depend on the executable, compile it when needed.
+$(OLD_TEST_OUTFILES:.out=):
+       cd testdir
+       - if exist $@.out del $@.out
+       $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) nolog
+       $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) $@.out
+       @ if exist test.log ( type test.log & exit /b 1 )
+       cd ..
+
+# Run individual NEW style test.
+# These do not depend on the executable, compile it when needed.
 $(NEW_TESTS):
        cd testdir
        - if exist $@.res del $@.res
-       $(MAKE) /NOLOGO -f Make_dos.mak nolog
-       $(MAKE) /NOLOGO -f Make_dos.mak $@.res
-       $(MAKE) /NOLOGO -f Make_dos.mak report
-       type messages
+       $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) nolog
+       $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) $@.res
+       $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) report
        cd ..
 
 ###########################################################################
index eda1a521cd8ba2a94cb2a30c146d42cad1a34652..7aec010c89c12ad096d8edc6156524fdc616784a 100644 (file)
@@ -69,9 +69,14 @@ $(TEST_OUTFILES): $(DOSTMP)\$(*B).in
 $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
 
 report:
-       @echo ""
+       @rem without the +eval feature test_result.log is a copy of test.log
+       @if exist test.log ( copy /y test.log test_result.log > nul ) \
+               else ( echo No failures reported > test_result.log )
+       $(VIMPROG) -u NONE $(NO_INITS) -S summarize.vim messages
+       @echo.
        @echo Test results:
-       @if exist test.log ( type test.log & echo TEST FAILURE & exit /b 1 ) \
+       @type test_result.log
+       @if exist test.log ( echo TEST FAILURE & exit /b 1 ) \
                else ( echo ALL DONE )
 
 clean:
@@ -92,12 +97,14 @@ clean:
        -for /d %i in (X*) do @rmdir /s/q %i
        -if exist viminfo del viminfo
        -if exist test.log del test.log
+       -if exist test_result.log del test_result.log
        -if exist messages del messages
        -if exist benchmark.out del benchmark.out
        -if exist opt_test.vim del opt_test.vim
 
 nolog:
        -if exist test.log del test.log
+       -if exist test_result.log del test_result.log
        -if exist messages del messages
 
 benchmark:
index c378c1bba7c22c486117f87f817dc4c5b8937551..f2a8d6ca91ae73641f9bf3063365c5f1a0cb179e 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2196,
 /**/
     2195,
 /**/