mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 1701701 - Allow for multiple pytest jobs when setting up harness symlink; r=ahal
When the fixture encounters FileExistsError for the harness symlink, the only apparent possibility is that another thread set up the symlink while this thread was trying to; no matter: as long as the symlink has been set up, everything should work. Differential Revision: https://phabricator.services.mozilla.com/D161534
This commit is contained in:
parent
b851d5b2e2
commit
b4c0519da6
@ -72,7 +72,11 @@ def setup_test_harness(request, flavor="plain"):
|
||||
if hasattr(os, "symlink"):
|
||||
if not os.path.isdir(os.path.dirname(test_root)):
|
||||
os.makedirs(os.path.dirname(test_root))
|
||||
os.symlink(files_dir, test_root)
|
||||
try:
|
||||
os.symlink(files_dir, test_root)
|
||||
except FileExistsError:
|
||||
# another pytest job set up the symlink - no problem
|
||||
pass
|
||||
else:
|
||||
shutil.copytree(files_dir, test_root)
|
||||
elif "TEST_HARNESS_ROOT" in os.environ:
|
||||
|
Loading…
Reference in New Issue
Block a user