Author chris.jerdonek
Recipients chris.jerdonek
Date 2012-07-09.11:45:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1341834351.63.0.548541942582.issue15305@psf.upfronthosting.co.za>
In-reply-to
Content
It seems like our test harness is disambiguating more than it needs to for parallel testing.

In Lib/test/regrtest.py, we do this--

# Define a writable temp dir that will be used as cwd while running
# the tests. The name of the dir includes the pid to allow parallel
# testing (see the -j option).
TESTCWD = 'test_python_{}'.format(os.getpid())
...
with support.temp_cwd(TESTCWD, quiet=True):
    main()

And then in Lib/test/support.py, we are doing this--

# Disambiguate TESTFN for parallel testing, while letting it remain a valid
# module name.
TESTFN = "{}_{}_tmp".format(TESTFN, os.getpid())

with uses like--

with open(TESTFN, "wb") as f:
    # Do stuff with f.

It seems like only one of these measures should be necessary (a single working directory for all parallel tests using a disambiguated TESTFN, or one working directory for each process with a non-disambiguated TESTFN).
History
Date User Action Args
2012-07-09 11:45:51chris.jerdoneksetrecipients: + chris.jerdonek
2012-07-09 11:45:51chris.jerdoneksetmessageid: <1341834351.63.0.548541942582.issue15305@psf.upfronthosting.co.za>
2012-07-09 11:45:51chris.jerdoneklinkissue15305 messages
2012-07-09 11:45:50chris.jerdonekcreate