Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
59c1034c
Commit
59c1034c
authored
Jun 03, 2011
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close #12250: Disable the regrtest timeout by default
Keep a timeout of 1 hour for buildbots.
parent
6135fb40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
Lib/test/regrtest.py
Lib/test/regrtest.py
+7
-9
Makefile.pre.in
Makefile.pre.in
+1
-1
No files found.
Lib/test/regrtest.py
View file @
59c1034c
...
...
@@ -22,8 +22,7 @@ Options:
-h/--help -- print this text and exit
--timeout TIMEOUT
-- dump the traceback and exit if a test takes more
than TIMEOUT seconds (default: 30 minutes); disable
the timeout if TIMEOUT is zero
than TIMEOUT seconds
--wait -- wait for user input, e.g., allow a debugger to be attached
Verbosity
...
...
@@ -269,11 +268,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
# Display the Python traceback fatal errors (e.g. segfault)
faulthandler
.
enable
(
all_threads
=
True
)
if
hasattr
(
faulthandler
,
'dump_tracebacks_later'
):
timeout
=
60
*
60
else
:
timeout
=
None
replace_stdout
()
support
.
record_original_stdout
(
sys
.
stdout
)
...
...
@@ -295,6 +289,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
use_resources
=
[]
debug
=
False
start
=
None
timeout
=
None
for
o
,
a
in
opts
:
if
o
in
(
'-h'
,
'--help'
):
print
(
__doc__
)
...
...
@@ -420,10 +415,13 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
testdir
=
os
.
path
.
join
(
support
.
SAVEDCWD
,
a
)
elif
o
==
'--timeout'
:
if
not
hasattr
(
faulthandler
,
'dump_tracebacks_later'
):
print
(
"
--
timeout option requires "
print
(
"
The
timeout option requires "
"faulthandler.dump_tracebacks_later"
,
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
timeout
=
float
(
a
)
if
timeout
<=
0
:
print
(
"The timeout must be greater than 0"
,
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
elif
o
==
'--wait'
:
input
(
"Press any key to continue..."
)
else
:
...
...
@@ -835,7 +833,7 @@ def runtest(test, verbose, quiet,
support.verbose = verbose # Tell tests to be moderately quiet
if use_resources is not None:
support.use_resources = use_resources
use_timeout = (timeout is not None
and timeout > 0
)
use_timeout = (timeout is not None)
if use_timeout:
faulthandler.dump_tracebacks_later(timeout, exit=True)
try:
...
...
Makefile.pre.in
View file @
59c1034c
...
...
@@ -755,7 +755,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
# generated bytecode. This is sometimes a very shy bug needing a lot of
# sample data.
TESTOPTS
=
-l
$(EXTRATESTOPTS)
TESTOPTS
=
-l
--timeout
=
3600
$(EXTRATESTOPTS)
TESTPROG
=
$(srcdir)
/Lib/test/regrtest.py
TESTPYTHON
=
$(RUNSHARED)
./
$(BUILDPYTHON)
-Wd
-E
-bb
$(TESTPYTHONOPTS)
test
:
all platform
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment