mirror of
				https://github.com/vim/vim.git
				synced 2025-10-30 09:47:20 -04:00 
			
		
		
		
	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)
This commit is contained in:
		| @@ -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 .. | ||||
|  | ||||
| ########################################################################### | ||||
|   | ||||
| @@ -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: | ||||
|   | ||||
| @@ -741,6 +741,8 @@ static char *(features[]) = | ||||
|  | ||||
| static int included_patches[] = | ||||
| {   /* Add new patch number below this line */ | ||||
| /**/ | ||||
|     2196, | ||||
| /**/ | ||||
|     2195, | ||||
| /**/ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user