comparison src/testdir/Makefile @ 30449:55aa44dd59ef v9.0.0560

patch 9.0.0560: elapsed time since testing started is not visible Commit: https://github.com/vim/vim/commit/b9093d50098ccff3848c2a404b9d0324a074c7b7 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 23 19:42:31 2022 +0100 patch 9.0.0560: elapsed time since testing started is not visible Problem: Elapsed time since testing started is not visible. Solution: Show the elapsed time while running tests.
author Bram Moolenaar <Bram@vim.org>
date Fri, 23 Sep 2022 20:45:03 +0200
parents f652823ce8bb
children bea4ebf594c6
comparison
equal deleted inserted replaced
30448:48f3922a1dac 30449:55aa44dd59ef
10 SCRIPTSOURCE = ../../runtime 10 SCRIPTSOURCE = ../../runtime
11 11
12 # Comment out this line to see the verbose output of tests. 12 # Comment out this line to see the verbose output of tests.
13 # 13 #
14 # Catches SwapExists to avoid hanging at the ATTENTION prompt. 14 # Catches SwapExists to avoid hanging at the ATTENTION prompt.
15 REDIR_TEST_TO_NULL = --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C LANG=C LANGUAGE=C awk '/Executing Test_/{match($$0, "(took .*; now )?Executing Test_[^\\)]*\\)"); print substr($$0, RSTART, RLENGTH) "\r"; fflush()}' 15 REDIR_TEST_TO_NULL = --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C LANG=C LANGUAGE=C awk '/Executing Test_/{match($$0, "([0-9][0-9]:[0-9][0-9] *)?Executing Test_[^\\)]*\\)"); print substr($$0, RSTART, RLENGTH) "\r"; fflush()}'
16 16
17 # Uncomment this line to use valgrind for memory leaks and extra warnings. 17 # Uncomment this line to use valgrind for memory leaks and extra warnings.
18 # The output goes into a file "valgrind.testN" 18 # The output goes into a file "valgrind.testN"
19 # Vim should be compiled with EXITFREE to avoid false warnings. 19 # Vim should be compiled with EXITFREE to avoid false warnings.
20 # This will make testing about 10 times as slow. 20 # This will make testing about 10 times as slow.
47 @/bin/sh -c "if test -f test.log; \ 47 @/bin/sh -c "if test -f test.log; \
48 then cp test.log test_result.log; \ 48 then cp test.log test_result.log; \
49 else echo No failures reported > test_result.log; \ 49 else echo No failures reported > test_result.log; \
50 fi" 50 fi"
51 $(VIMPROG) -u NONE $(NO_INITS) -S summarize.vim messages $(REDIR_TEST_TO_NULL) 51 $(VIMPROG) -u NONE $(NO_INITS) -S summarize.vim messages $(REDIR_TEST_TO_NULL)
52 @rm -f starttime
52 @echo 53 @echo
53 @echo 'Test results:' 54 @echo 'Test results:'
54 @cat test_result.log 55 @cat test_result.log
55 @/bin/sh -c "if test -f test.log; \ 56 @/bin/sh -c "if test -f test.log; \
56 then echo TEST FAILURE; exit 1; \ 57 then echo TEST FAILURE; exit 1; \
61 62
62 63
63 # Execute an individual new style test, e.g.: 64 # Execute an individual new style test, e.g.:
64 # make test_largefile 65 # make test_largefile
65 $(NEW_TESTS): 66 $(NEW_TESTS):
66 rm -f $@.res test.log messages 67 rm -f $@.res $(CLEANUP_FILES)
67 @MAKEFLAGS=--no-print-directory $(MAKE) -f Makefile $@.res VIMPROG=$(VIMPROG) XXDPROG=$(XXDPROG) SCRIPTSOURCE=$(SCRIPTSOURCE) 68 @MAKEFLAGS=--no-print-directory $(MAKE) -f Makefile $@.res VIMPROG=$(VIMPROG) XXDPROG=$(XXDPROG) SCRIPTSOURCE=$(SCRIPTSOURCE)
68 @cat messages 69 @cat messages
69 @if test -f test.log; then \ 70 @if test -f test.log; then \
70 exit 1; \ 71 exit 1; \
71 fi 72 fi
72 73
73 # Run only tests specific for Vim9 script 74 # Run only tests specific for Vim9 script
74 test_vim9: 75 test_vim9:
75 rm -f test_vim9_*.res test.log messages 76 rm -f test_vim9_*.res $(CLEANUP_FILES)
76 @MAKEFLAGS=--no-print-directory $(MAKE) -f Makefile $(TEST_VIM9_RES) VIMPROG=$(VIMPROG) XXDPROG=$(XXDPROG) SCRIPTSOURCE=$(SCRIPTSOURCE) 77 @MAKEFLAGS=--no-print-directory $(MAKE) -f Makefile $(TEST_VIM9_RES) VIMPROG=$(VIMPROG) XXDPROG=$(XXDPROG) SCRIPTSOURCE=$(SCRIPTSOURCE)
77 @cat messages 78 @cat messages
79 @rm -f starttime
78 @MAKEFLAGS=--no-print-directory $(MAKE) -f Makefile report VIMPROG=$(VIMPROG) XXDPROG=$(XXDPROG) SCRIPTSOURCE=$(SCRIPTSOURCE) 80 @MAKEFLAGS=--no-print-directory $(MAKE) -f Makefile report VIMPROG=$(VIMPROG) XXDPROG=$(XXDPROG) SCRIPTSOURCE=$(SCRIPTSOURCE)
79 @if test -f test.log; then \ 81 @if test -f test.log; then \
80 exit 1; \ 82 exit 1; \
81 fi 83 fi
82 84
86 88
87 # Delete files that may interfere with running tests. This includes some files 89 # Delete files that may interfere with running tests. This includes some files
88 # that may result from working on the tests, not only from running them. 90 # that may result from working on the tests, not only from running them.
89 clean: 91 clean:
90 -rm -rf *.out *.failed *.res *.rej *.orig XfakeHOME Xdir1 Xfind 92 -rm -rf *.out *.failed *.res *.rej *.orig XfakeHOME Xdir1 Xfind
91 -rm -f opt_test.vim test.log test_result.log messages 93 -rm -f opt_test.vim test_result.log $(CLEANUP_FILES)
92 -rm -rf $(RM_ON_RUN) $(RM_ON_START) 94 -rm -rf $(RM_ON_RUN) $(RM_ON_START)
93 -rm -f valgrind.* 95 -rm -f valgrind.*
94 -rm -f asan.* 96 -rm -f asan.*
95 -rm -f guidialog guidialogfile 97 -rm -f guidialog guidialogfile
96 98
97 # Delete the files produced by benchmarking, so they can run again. 99 # Delete the files produced by benchmarking, so they can run again.
98 benchmarkclean: 100 benchmarkclean:
99 rm -f $(SCRIPTS_BENCH) 101 rm -f $(SCRIPTS_BENCH)
100 102
101 nolog: 103 nolog:
102 -rm -f test.log test_result.log messages 104 -rm -f test_result.log $(CLEANUP_FILES)
103 105
104 106
105 # Tiny tests. Works even without the +eval feature. 107 # Tiny tests. Works even without the +eval feature.
106 tinytests: $(SCRIPTS_TINY_OUT) 108 tinytests: $(SCRIPTS_TINY_OUT)
107 109