New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: add no-capture option to runtests to allow debugging srctree tests #2701
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Just some minor comments.
runtests.py
Outdated
@@ -2118,6 +2132,9 @@ def main(): | |||
if options.xml_output_dir: | |||
shutil.rmtree(options.xml_output_dir, ignore_errors=True) | |||
|
|||
interval = 10 | |||
if not options.capture: | |||
interval = 10000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps set this to None and modify time_stamper_thread to return an empty context in that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
runtests.py
Outdated
@@ -2118,6 +2132,9 @@ def main(): | |||
if options.xml_output_dir: | |||
shutil.rmtree(options.xml_output_dir, ignore_errors=True) | |||
|
|||
interval = 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: it'd be cleaner to not re-assign (and perhaps name this something less generic).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
also added to |
Thanks! |
When running srctree tests, they run under a separate process. It is sometimes convenient to add a
import pdb;pdb.set_trace()
breakpoint inside one of these tests to debug what is going on, but the test runner captures stdout and stderr so the interactive prompt is swallowed. Add ano-capture
option toruntests
to allow the subtree tests to run without capturing stdout, stderr.If capturing is off, also increase the
time_stamper_thread
interval to prevent printing logging messages while debugging.