Patch 8.1.2196
Problem:    MS-Windows: running tests with MSVC lacks updates.
Solution:   Improve running individual tests on MS-Windows. (closes #4922)
Files:      src/Make_mvc.mak, src/testdir/Make_dos.mak


*** ../vim-8.1.2195/src/Make_mvc.mak    2019-10-10 13:39:04.879357080 +0200
--- src/Make_mvc.mak    2019-10-20 21:41:23.274093383 +0200
***************
*** 1279,1284 ****
--- 1279,1295 ----
  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,1376 ****
  notags:
        - if exist tags del tags
  
! clean:
        - if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR)
        - if exist *.obj del *.obj
        - if exist $(VIM).exe del $(VIM).exe
--- 1381,1387 ----
  notags:
        - if exist tags del tags
  
! clean: testclean
        - if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR)
        - if exist *.obj del *.obj
        - if exist $(VIM).exe del $(VIM).exe
***************
*** 1405,1411 ****
        cd GvimExt
        $(MAKE) /NOLOGO -f Makefile clean
        cd ..
-       - if exist testdir\*.out del testdir\*.out
  
  test:
        cd testdir
--- 1416,1421 ----
***************
*** 1422,1434 ****
        $(MAKE) /NOLOGO -f Make_dos.mak clean
        cd ..
  
  $(NEW_TESTS):
        cd testdir
        - if exist [email protected] del [email protected]
!       $(MAKE) /NOLOGO -f Make_dos.mak nolog
!       $(MAKE) /NOLOGO -f Make_dos.mak [email protected]
!       $(MAKE) /NOLOGO -f Make_dos.mak report
!       type messages
        cd ..
  
  ###########################################################################
--- 1432,1455 ----
        $(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 [email protected] del [email protected]
+       $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) nolog
+       $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) [email protected]
+       @ 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 [email protected] del [email protected]
!       $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) nolog
!       $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) [email protected]
!       $(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) report
        cd ..
  
  ###########################################################################
*** ../vim-8.1.2195/src/testdir/Make_dos.mak    2019-09-14 15:46:29.154270702 
+0200
--- src/testdir/Make_dos.mak    2019-10-20 21:41:23.274093383 +0200
***************
*** 69,77 ****
  $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
  
  report:
!       @echo ""
        @echo Test results:
!       @if exist test.log ( type test.log & echo TEST FAILURE & exit /b 1 ) \
                else ( echo ALL DONE )
  
  clean:
--- 69,82 ----
  $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
  
  report:
!       @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:
!       @type test_result.log
!       @if exist test.log ( echo TEST FAILURE & exit /b 1 ) \
                else ( echo ALL DONE )
  
  clean:
***************
*** 92,103 ****
--- 97,110 ----
        -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:
*** ../vim-8.1.2195/src/version.c       2019-10-20 21:15:07.457905609 +0200
--- src/version.c       2019-10-20 21:43:42.033785313 +0200
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     2196,
  /**/

-- 
Friends?  I have lots of friends!  In fact, I have all episodes ever made.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201910201947.x9KJloXF014245%40masaka.moolenaar.net.

Raspunde prin e-mail lui