Commit 9e586c2b authored by Victor Stinner's avatar Victor Stinner

Issue #12250: modify "make buildbottest" command line instead of TESTOPTS

Add TESTTIMEOUT variable (default: 3600 seconds). Use TESTTIMEOUT=0 to disable
the timeout.
***
fix
parent 8480bc65
...@@ -22,7 +22,8 @@ Options: ...@@ -22,7 +22,8 @@ Options:
-h/--help -- print this text and exit -h/--help -- print this text and exit
--timeout TIMEOUT --timeout TIMEOUT
-- dump the traceback and exit if a test takes more -- 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 --wait -- wait for user input, e.g., allow a debugger to be attached
Verbosity Verbosity
...@@ -420,8 +421,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, ...@@ -420,8 +421,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
sys.exit(1) sys.exit(1)
timeout = float(a) timeout = float(a)
if timeout <= 0: if timeout <= 0:
print("The timeout must be greater than 0", file=sys.stderr) timeout = None
sys.exit(1)
elif o == '--wait': elif o == '--wait':
input("Press any key to continue...") input("Press any key to continue...")
else: else:
......
...@@ -755,9 +755,10 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS) ...@@ -755,9 +755,10 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
# generated bytecode. This is sometimes a very shy bug needing a lot of # generated bytecode. This is sometimes a very shy bug needing a lot of
# sample data. # sample data.
TESTOPTS= -l --timeout=3600 $(EXTRATESTOPTS) TESTOPTS= -l $(EXTRATESTOPTS)
TESTPROG= $(srcdir)/Lib/test/regrtest.py TESTPROG= $(srcdir)/Lib/test/regrtest.py
TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -E -bb $(TESTPYTHONOPTS) TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -E -bb $(TESTPYTHONOPTS)
TESTTIMEOUT= 3600
test: all platform test: all platform
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
...@@ -789,7 +790,7 @@ buildbottest: all platform ...@@ -789,7 +790,7 @@ buildbottest: all platform
-@if which pybuildbot.identify >/dev/null 2>&1; then \ -@if which pybuildbot.identify >/dev/null 2>&1; then \
pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \ pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
fi fi
$(TESTPYTHON) $(TESTPROG) -uall -rwW $(TESTOPTS) $(TESTPYTHON) $(TESTPROG) -uall -rwW --timeout=$(TESTTIMEOUT) $(TESTOPTS)
QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \ QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
test_multibytecodec test_urllib2_localnet test_itertools \ test_multibytecodec test_urllib2_localnet test_itertools \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment