diff src/testdir/Makefile @ 6328:adfbffe1e642 v7.4.497

updated for version 7.4.497 Problem: With some regexp patterns the NFA engine uses many states and becomes very slow. To the user it looks like Vim freezes. Solution: When the number of states reaches a limit fall back to the old engine. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Wed, 05 Nov 2014 14:27:36 +0100
parents 1f9577e9ef1b
children 5a76e36f07b1
line wrap: on
line diff
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -48,12 +48,16 @@ SCRIPTS = test1.out test2.out test3.out 
 
 SCRIPTS_GUI = test16.out
 
+SCRIPTS_BENCH = bench_re_freeze.out
+
 .SUFFIXES: .in .out
 
 nongui:	nolog $(SCRIPTS) report
 
 gui:	nolog $(SCRIPTS) $(SCRIPTS_GUI) report
 
+benchmark: $(SCRIPTS_BENCH)
+
 report:
 	@echo
 	@echo 'Test results:'
@@ -65,7 +69,7 @@ report:
 $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
 
 RM_ON_RUN = test.out X* viminfo
-RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok
+RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok benchmark.out
 RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in
 
 clean:
@@ -120,5 +124,14 @@ test49.out: test49.vim
 
 test60.out: test60.vim
 
+bench_re_freeze.out: bench_re_freeze.vim
+	-rm -rf benchmark.out $(RM_ON_RUN)
+	# Sleep a moment to avoid that the xterm title is messed up.
+	# 200 msec is sufficient, but only modern sleep supports a fraction of
+	# a second, fall back to a second if it fails.
+	@-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
+	-$(RUN_VIM) $*.in
+	@/bin/sh -c "if test -f benchmark.out; then cat benchmark.out; fi"
+
 nolog:
 	-rm -f test.log