summaryrefslogtreecommitdiffstats
path: root/test/Parallel
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-04-26 17:10:19 (GMT)
committerMats Wichmann <mats@linux.com>2019-04-26 19:11:59 (GMT)
commit15326cf04732bbcc5ef62c5452349a4bd029b70e (patch)
tree8a7f61381f13838164e43bcb533adf1e5efd93ee /test/Parallel
parent0e84c296d686e4384c8e6f5137a7c15e51dcb167 (diff)
downloadSCons-15326cf04732bbcc5ef62c5452349a4bd029b70e.zip
SCons-15326cf04732bbcc5ef62c5452349a4bd029b70e.tar.gz
SCons-15326cf04732bbcc5ef62c5452349a4bd029b70e.tar.bz2
[PR #3345] fix more PY3.8 fails
File closes in msvs tool Context manager in rpm tool Dummy compiler, assembler scripts can be called in unexpected ways (namely by gcc tool init), which passes --version flag. don't take exception on the getopt call. Try again to undo my breakage of _subproc, which was failing on Win+PY27 Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/Parallel')
-rw-r--r--test/Parallel/failed-build.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Parallel/failed-build.py b/test/Parallel/failed-build.py
index bfdc01d..12a8f04 100644
--- a/test/Parallel/failed-build.py
+++ b/test/Parallel/failed-build.py
@@ -77,7 +77,14 @@ test.write('mycopy.py', r"""\
import os
import sys
import time
-os.mkdir('mycopy.started')
+try:
+ os.makedirs('mycopy.started', exist_ok=True)
+except TypeError: # Python 2 has no exist_ok
+ try:
+ os.mkdir('mycopy.started')
+ except FileExistsError:
+ pass
+
with open(sys.argv[1], 'wb') as ofp, open(sys.argv[2], 'rb') as ifp:
ofp.write(ifp.read())
for i in [1, 2, 3, 4, 5]: