]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1981: tests: test suite may stop on error in gen_opt_test.vim v9.1.1981
authorMURAOKA Taro <koron.kaoriya@gmail.com>
Mon, 15 Dec 2025 18:51:55 +0000 (19:51 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 15 Dec 2025 18:51:55 +0000 (19:51 +0100)
Problem:  tests: test suite may stop on error in gen_opt_test.vim
Solution: Use a different output file for log files (Muraoka Taro)

When running newtests, it may unexpectedly stop just before
test_options_all.

Cause: When generating the opt_test.vim file for test_options_all, the
failure is detected by the existence of test.log. Therefore, if a test
performed before test_options_all fails and test.log is created, it is
mistakenly thought that the generation of opt_tet.vim has failed, and
the test suite stops there.

So let's change the filename created when utils/gen_opt_test.vim fails
from test.log to gen_opt_test.log, so that it can be detected
independently from other test failures.

closes: #18928

Signed-off-by: MURAOKA Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/Make_ming.mak
src/testdir/Make_mvc.mak
src/testdir/Makefile
src/testdir/util/gen_opt_test.vim
src/version.c

index b11d2ea8efe9615bc6894bd5e39b54fd9edf28fb..956ef7e439910d674854012eac871a20a087643f 100644 (file)
@@ -88,6 +88,7 @@ clean:
        -@if exist starttime $(DEL) starttime
        -@if exist benchmark.out del benchmark.out
        -@if exist opt_test.vim $(DEL) opt_test.vim
+       -@if exist gen_opt_test.log $(DEL) gen_opt_test.log
        -@if exist guidialog $(DEL) guidialog
        -@if exist guidialogfile $(DEL) guidialogfile
 
@@ -159,8 +160,8 @@ test_gui_init.res: test_gui_init.vim
 
 opt_test.vim: util/gen_opt_test.vim ../optiondefs.h ../../runtime/doc/options.txt
        $(VIMPROG) -e -s -u NONE $(COMMON_ARGS) --nofork -S $^
-       @if test -f test.log; then \
-               cat test.log; \
+       @if test -f gen_opt_test.log; then \
+               cat gen_opt_test.log; \
                exit 1; \
        fi
 
index a092c63ba8a015511db7513347ba0ab5de12de1a..41ecce716585bc460dec8fae0085d0c523cc4a00 100644 (file)
@@ -87,6 +87,7 @@ clean:
        - if exist starttime $(RM) starttime
        - if exist benchmark.out $(RM) benchmark.out
        - if exist opt_test.vim $(RM) opt_test.vim
+       - if exist gen_opt_test.log $(RM) gen_opt_test.log
        - if exist guidialog $(RM) guidialog
        - if exist guidialogfile $(RM) guidialogfile
 
@@ -160,7 +161,7 @@ test_gui_init.res: test_gui_init.vim
 opt_test.vim: util/gen_opt_test.vim ../optiondefs.h \
                ../../runtime/doc/options.txt
        $(VIMPROG) -e -s -u NONE $(COMMON_ARGS) --nofork -S $**
-       @ if exist test.log ( type test.log & exit /b 1 )
+       @ if exist gen_opt_test.log ( type gen_opt_test.log & exit /b 1 )
 
 test_bench_regexp.res: test_bench_regexp.vim
        - if exist benchmark.out $(RM) benchmark.out
index f784d80de8326f8993809727ffd2a27766492364..7c39b47e6dfbe9dc3c757bd90045c7cce5a06af5 100644 (file)
@@ -94,6 +94,7 @@ RUN_VIMPROG = VIMRUNTIME=$(SCRIPTSOURCE) $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -
 clean:
        -rm -rf *.out *.failed *.res *.rej *.orig XfakeHOME Xdir1 Xfind failed
        -rm -f opt_test.vim test_result.log $(CLEANUP_FILES)
+       -rm -f gen_opt_test.log
        -rm -rf $(RM_ON_RUN) $(RM_ON_START)
        -rm -f valgrind.*
        -rm -f asan.* asan_test_*
@@ -188,8 +189,8 @@ opt_test.vim: $(GEN_OPT_DEPS)
        else \
                $(VIMPROG) -e -s -u NONE $(NO_INITS) --nofork --gui-dialog-file guidialog -S $(GEN_OPT_DEPS) ; \
        fi
-       @if test -f test.log; then \
-               cat test.log; \
+       @if test -f gen_opt_test.log; then \
+               cat gen_opt_test.log; \
                exit 1; \
        fi
 
index eef33289132fc1477ab4fd2b99ca8ccf27cac214..7c7a0ce4720f5321ff6d3e1ce3129f9e751d5595 100644 (file)
@@ -515,7 +515,7 @@ catch
   " Append errors to test.log
   let error = $'Error: {v:exception} in {v:throwpoint}'
   echoc error
-  split test.log
+  split gen_opt_test.log
   call append('$', error)
   write
 endtry
index e75a9782c1199c68416bfc230cb3bf1fc8ec7aab..92005c71691779d2b86b24e4e4d039f88cb3b78c 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1981,
 /**/
     1980,
 /**/