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.

Author eli.bendersky
Recipients eli.bendersky, ezio.melotti, ncoghlan, serhiy.storchaka
Date 2013-09-03.13:47:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAF-Rda8Sd4EXTVVyHydH9VoRDf_ugfdHK3FwctVz7Jr36rm=sQ@mail.gmail.com>
In-reply-to <1378200721.76.0.432578428028.issue18906@psf.upfronthosting.co.za>
Content
On Tue, Sep 3, 2013 at 2:32 AM, Serhiy Storchaka <report@bugs.python.org>wrote:

>
> Serhiy Storchaka added the comment:
>
> > The most natural approach is to have a special attribute set in the
> module's global dict (for example: __REGRTEST_SUBPROCESS__ = True);
> however, there's a slight problem with this approach - regrtest has to
> import the module to see this attribute, and the module may do some work in
> its top-level code (commonly, imports) that already needs to be done within
> a subprocess.
>
> The main regrtest process can run auxilary child process which imports all
> test modules and says main process which of them have
> __REGRTEST_SUBPROCESS__=True.
>
> It will be even better if the main process runs child process for testing
> all tests so when any test crashes it is possible to report this and
> respawn child process to continue testing other tests.
>

Well, if we go *that* way, my initial proposal would be to just always run
every test in a subprocess. Kind of what happens today with -jN, just also
for -j1. Since most people, and I assume bots, run -jN anyway, they already
see each test executed in a subprocess. Some folks didn't feel good about
it because the stress testing "all in one process" provides is apparently
desired.

Your proposal complicates the flow significantly, IMHO. I'd just run each
test in its own subprocess and be done with it.
History
Date User Action Args
2013-09-03 13:47:17eli.benderskysetrecipients: + eli.bendersky, ncoghlan, ezio.melotti, serhiy.storchaka
2013-09-03 13:47:17eli.benderskylinkissue18906 messages
2013-09-03 13:47:16eli.benderskycreate