[Python-checkins] cpython: Issue #12250: modify "make buildbottest" command line instead of TESTOPTS

victor.stinner python-checkins at python.org
Mon Jun 6 12:06:41 CEST 2011


http://hg.python.org/cpython/rev/bab599e4bd09
changeset: 70657:bab599e4bd09
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Mon Jun 06 12:04:36 2011 +0200
summary:
 Issue #12250: modify "make buildbottest" command line instead of TESTOPTS
Add TESTTIMEOUT variable (default: 3600 seconds). Use TESTTIMEOUT=0 to disable
the timeout.
***
fix
files:
 Lib/test/regrtest.py | 6 +++---
 Makefile.pre.in | 5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -22,7 +22,8 @@
 -h/--help -- print this text and exit
 --timeout TIMEOUT
 -- dump the traceback and exit if a test takes more
- than TIMEOUT seconds
+ than TIMEOUT seconds; disabled if TIMEOUT is negative
+ or equals to zero
 --wait -- wait for user input, e.g., allow a debugger to be attached
 
 Verbosity
@@ -420,8 +421,7 @@
 sys.exit(1)
 timeout = float(a)
 if timeout <= 0:
- print("The timeout must be greater than 0", file=sys.stderr)
- sys.exit(1)
+ timeout = None
 elif o == '--wait':
 input("Press any key to continue...")
 else:
diff --git a/Makefile.pre.in b/Makefile.pre.in
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -755,9 +755,10 @@
 # generated bytecode. This is sometimes a very shy bug needing a lot of
 # sample data.
 
-TESTOPTS=	-l --timeout=3600 $(EXTRATESTOPTS)
+TESTOPTS=	-l $(EXTRATESTOPTS)
 TESTPROG=	$(srcdir)/Lib/test/regrtest.py
 TESTPYTHON=	$(RUNSHARED) ./$(BUILDPYTHON) -Wd -E -bb $(TESTPYTHONOPTS)
+TESTTIMEOUT=	3600
 test:		all platform
 		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
 		-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
@@ -789,7 +790,7 @@
 		- at if which pybuildbot.identify >/dev/null 2>&1; then \
 			pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
 		fi
-		$(TESTPYTHON) $(TESTPROG) -uall -rwW $(TESTOPTS)
+		$(TESTPYTHON) $(TESTPROG) -uall -rwW --timeout=$(TESTTIMEOUT) $(TESTOPTS)
 
 QUICKTESTOPTS=	$(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
 		test_multibytecodec test_urllib2_localnet test_itertools \
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /