This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Make --nowindows argument to regrtest propagate when running with -j
Type: enhancement Stage: needs patch
Components: Tests, Windows Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Priority: normal Keywords:

Created on 2015-09-04 20:46 by brett.cannon, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (12)
msg249828 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2015-09-04 20:46
Not sure how feasible this is, but when running tests under Windows it's very nice to run with --nowindows on, else you get barraged with a ton of debugging warnings. The problem is that if you use -j the use of --nowindows gets turned off. It would be nice if using --nowindows worked with -j to speed up test execution on Windows while also being less noisy.
msg249846 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-09-04 22:33
I'd be happy to always disable assert dialogs/output in regrtest, and then use "-n" to enable stderr output. That way people simply testing their own debug builds don't think it's failed, and the buildbots keep all the output they currently have.
msg249859 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2015-09-04 23:09
Steve's idea SGTM.
msg251904 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-09-30 00:43
This issue has been fixed by the following change:

changeset:   98427:b48ae54ed5be
user:        Victor Stinner <victor.stinner@gmail.com>
date:        Wed Sep 30 01:39:28 2015 +0200
files:       Lib/test/libregrtest/cmdline.py Lib/test/libregrtest/main.py Lib/te
description:
Issue #25220, libregrtest: Call setup_python(ns) in the slaves

Slaves (child processes running tests for regrtest -jN) now inherit
--memlimit/-M, --threshold/-t and --nowindows/-n options.

* -M, -t and -n are now supported with -jN
* Factorize code to run tests.
* run_test_in_subprocess() now pass the whole "ns" namespace to the child
  process.
msg251905 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-09-30 00:48
Steve wrote:
"I'd be happy to always disable assert dialogs/output in regrtest, and then use "-n" to enable stderr output. That way people simply testing their own debug builds don't think it's failed, and the buildbots keep all the output they currently have."

I would prefer to have a new option for that, to keep backward compatibility on regrtest parameters.

We may also always hide popups and deprecated --nowindows, but that's differrent.

What do you think?
msg251906 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-09-30 01:05
So basically what I said (-n becomes redundant) and a new option for logging asserts to stderr? I don't really mind, but it seems like more of a compatibility break.
msg251908 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-09-30 01:08
Steve Dower added the comment:
> So basically what I said (-n becomes redundant)

ok

> and a new option for logging asserts to stderr?

Yes. Modify PCbuild/rt.bat and/or Tools/buildbot/test.bat to enable
the option on Windows buildbots.
msg251910 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-09-30 01:10
> Yes. Modify PCbuild/rt.bat and/or Tools/buildbot/test.bat to enable
> the option on Windows buildbots.

Wait, I'm not sure that I understood. You want to hide warnings by
default, and add an options to show them? If it's the case, no,
PCbuild/rt.bat and Tools/buildbot/test.bat must not be modified.
Sorry.

For popups: would it be useful for a specific use case to get them?
(Should we add an option to *enable* popups, since they will be
disabled by default.)
msg251911 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-09-30 02:48
I was only going to disable them by default for regrtest. The only way users will see them is when using the debug binaries or in their own extensions built in debug mode. We just don't want them scaring users who have just built from source and don't know about -n when they run the tests.
msg251912 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-09-30 03:26
Just to add my 0.02USD:

I think my preferred course of action would be to enable '-n' by default and deprecate/ignore the option.  For the assert output on stderr, I think it would be fine to hide it by default, but show it if verbose > i for some value of i (0 or 1, probably).  They really don't add much except spam in the buildbot logs.

Also, for the record, changes to how the buildbots are called isn't very hard; let me know if any are needed.  I'd like to eventually get rid of Tools/buildbot and just let the buildbots call the same things the same way users do.
msg252864 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-10-12 15:45
Between Victor's fix and #23919, is there anything left to do for this?
msg252870 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-10-12 16:26
We are good, I close the issue.
History
Date User Action Args
2022-04-11 14:58:20adminsetgithub: 69189
2015-10-12 16:26:01vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg252870
2015-10-12 15:45:52steve.dowersetmessages: + msg252864
2015-09-30 03:26:29zach.waresetmessages: + msg251912
2015-09-30 02:48:38steve.dowersetmessages: + msg251911
2015-09-30 01:10:24vstinnersetmessages: + msg251910
2015-09-30 01:08:37vstinnersetmessages: + msg251908
2015-09-30 01:05:18steve.dowersetmessages: + msg251906
2015-09-30 00:48:25vstinnersetmessages: + msg251905
2015-09-30 00:43:44vstinnersetmessages: + msg251904
2015-09-29 11:53:51vstinnersetnosy: + vstinner
2015-09-04 23:09:32brett.cannonsetmessages: + msg249859
2015-09-04 22:33:27steve.dowersetmessages: + msg249846
versions: + Python 3.5
2015-09-04 20:46:57brett.cannoncreate