Skip to content

Instantly share code, notes, and snippets.

@k-takata
Last active August 11, 2020 01:51
Show Gist options
  • Save k-takata/99f21f641eae843df866eae729b2e2f5 to your computer and use it in GitHub Desktop.
Save k-takata/99f21f641eae843df866eae729b2e2f5 to your computer and use it in GitHub Desktop.
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -1326,9 +1326,6 @@ MAIN_TARGET = $(VIM).exe
# Target to run individual tests.
VIMTESTTARGET = $(VIM).exe
-OLD_TEST_OUTFILES = \
- $(SCRIPTS_FIRST)
-
all: $(MAIN_TARGET) \
vimrun.exe \
install.exe \
@@ -1480,16 +1477,6 @@ 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):
diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak
index 07927f6a7..ba1336596 100644
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -9,56 +9,15 @@ default: nongui
!include Make_all.mak
-TEST_OUTFILES = $(SCRIPTS_FIRST)
-DOSTMP = dostmp
-DOSTMP_OUTFILES = $(TEST_OUTFILES:test=dostmp\test)
-DOSTMP_INFILES = $(DOSTMP_OUTFILES:.out=.in)
+.SUFFIXES: .res .vim
-.SUFFIXES: .in .out .res .vim
-
-nongui: nolog $(SCRIPTS_FIRST) newtests report
+nongui: nolog newtests report
small: nolog report
-gui: nolog $(SCRIPTS_FIRST) newtests report
-
-win32: nolog $(SCRIPTS_FIRST) newtests report
-
-# Copy the input files to dostmp, changing the fileformat to dos.
-$(DOSTMP_INFILES): $(*B).in
- if not exist $(DOSTMP)\NUL md $(DOSTMP)
- if exist $@ del $@
- $(VIMPROG) -u dos.vim $(NO_INITS) "+set ff=dos|f $@|wq" $(*B).in
-
-# For each input file dostmp/test99.in run the tests.
-# This moves test99.in to test99.in.bak temporarily.
-$(TEST_OUTFILES): $(DOSTMP)\$(*B).in
- -@if exist test.out DEL test.out
- -@if exist $(DOSTMP)\$(*B).out DEL $(DOSTMP)\$(*B).out
- move $(*B).in $(*B).in.bak > nul
- copy $(DOSTMP)\$(*B).in $(*B).in > nul
- copy $(*B).ok test.ok > nul
- $(VIMPROG) -u dos.vim $(NO_INITS) -s dotest.in $(*B).in
- -@if exist test.out MOVE /y test.out $(DOSTMP)\$(*B).out > nul
- -@if exist $(*B).in.bak move /y $(*B).in.bak $(*B).in > nul
- -@if exist test.ok del test.ok
- -@if exist Xdir1 rd /s /q Xdir1
- -@if exist Xfind rd /s /q Xfind
- -@if exist XfakeHOME rd /s /q XfakeHOME
- -@del X*
- -@if exist viminfo del viminfo
- $(VIMPROG) -u dos.vim $(NO_INITS) "+set ff=unix|f test.out|wq" \
- $(DOSTMP)\$(*B).out
- @diff test.out $*.ok & if errorlevel 1 \
- ( move /y test.out $*.failed > nul \
- & del $(DOSTMP)\$(*B).out \
- & echo $* FAILED >> test.log ) \
- else ( move /y test.out $*.out > nul )
-
-# Must run test1 first to create small.vim.
-# This rule must come after the one that copies the input files to dostmp to
-# allow for running an individual test.
-$(NEW_TESTS_RES): $(SCRIPTS_FIRST)
+gui: nolog newtests report
+
+win32: nolog newtests report
report:
@rem without the +eval feature test_result.log is a copy of test.log
@@ -75,7 +34,7 @@ clean:
-del *.out
-del *.failed
-del *.res
- -if exist $(DOSTMP) rd /s /q $(DOSTMP)
+ -if exist dostmp rd /s /q dostmp
-if exist test.in del test.in
-if exist test.ok del test.ok
-if exist small.vim del small.vim
diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak
index b054f8737..3be4007b1 100644
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -30,34 +30,25 @@ include Make_all.mak
SCRIPTS_BENCH = test_bench_regexp.res
-# Must run test1 first to create small.vim.
-$(NEW_TESTS_RES): $(SCRIPTS_FIRST)
+.SUFFIXES: .res .vim
-.SUFFIXES: .in .out .res .vim
-
-vimall: fixff $(SCRIPTS_FIRST) newtests
+vimall: newtests
@echo ALL DONE
-nongui: fixff nolog $(SCRIPTS_FIRST) newtests
+nongui: nolog newtests
@echo ALL DONE
benchmark: $(SCRIPTS_BENCH)
-small: nolog
+small: nolog
@echo ALL DONE
-gui: fixff nolog $(SCRIPTS_FIRST) newtests
+gui: nolog newtests
@echo ALL DONE
-win32: fixff nolog $(SCRIPTS_FIRST) newtests
+win32: nolog newtests
@echo ALL DONE
-# TODO: find a way to avoid changing the distributed files.
-fixff:
- -$(VIMPROG) -u dos.vim $(NO_INITS) "+argdo set ff=dos|upd" +q *.in *.ok
- -$(VIMPROG) -u dos.vim $(NO_INITS) "+argdo set ff=unix|upd" +q \
- dotest.in
-
clean:
-@if exist *.out $(DEL) *.out
-@if exist *.failed $(DEL) *.failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment