Skip to content

Commit 6946c7d

Browse files
committed
---
yaml --- r: 177065 b: refs/heads/auto c: 58d03ad h: refs/heads/master i: 177063: ff50809 v: v3
1 parent c99d945 commit 6946c7d

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 04408fadd39b8fe75a97f08186be6701dd200799
13+
refs/heads/auto: 58d03ad95d2f02a693869faa1081091d6999cd93
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/etc/maketest.py

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
import os
1313
import sys
1414

15-
# msys1/msys2 automatically converts `/abs/path1:/abs/path2` into
16-
# `c:\real\abs\path1;c:\real\abs\path2` (semicolons) if shell thinks
17-
# the value is list of paths.
18-
# (if there is only one path, it becomes `c:/real/abs/path`.)
19-
# this causes great confusion and error: shell and Makefile doesn't like
20-
# windows paths so it is really error-prone. revert it for peace.
15+
2116
def normalize_path(v):
17+
"""msys1/msys2 automatically converts `/abs/path1:/abs/path2` into
18+
`c:\real\abs\path1;c:\real\abs\path2` (semicolons) if shell thinks
19+
the value is list of paths.
20+
(if there is only one path, it becomes `c:/real/abs/path`.)
21+
this causes great confusion and error: shell and Makefile doesn't like
22+
windows paths so it is really error-prone. revert it for peace."""
2223
v = v.replace('\\', '/')
2324
# c:/path -> /c/path
2425
if ':/' in v:
@@ -31,6 +32,7 @@ def putenv(name, value):
3132
value = normalize_path(value)
3233
os.putenv(name, value)
3334

35+
3436
def convert_path_spec(name, value):
3537
if os.name == 'nt' and name != 'PATH':
3638
value = ":".join(normalize_path(v) for v in value.split(";"))
@@ -42,14 +44,14 @@ def convert_path_spec(name, value):
4244
putenv('CC', sys.argv[5])
4345
putenv('RUSTDOC', os.path.abspath(sys.argv[6]))
4446
filt = sys.argv[7]
45-
putenv('LD_LIB_PATH_ENVVAR', sys.argv[8]);
46-
putenv('HOST_RPATH_DIR', os.path.abspath(sys.argv[9]));
47-
putenv('TARGET_RPATH_DIR', os.path.abspath(sys.argv[10]));
47+
putenv('LD_LIB_PATH_ENVVAR', sys.argv[8])
48+
putenv('HOST_RPATH_DIR', os.path.abspath(sys.argv[9]))
49+
putenv('TARGET_RPATH_DIR', os.path.abspath(sys.argv[10]))
4850
putenv('RUST_BUILD_STAGE', sys.argv[11])
4951
putenv('S', os.path.abspath(sys.argv[12]))
5052
putenv('PYTHON', sys.executable)
5153

52-
if not filt in sys.argv[1]:
54+
if filt not in sys.argv[1]:
5355
sys.exit(0)
5456
print('maketest: ' + os.path.basename(os.path.dirname(sys.argv[1])))
5557

@@ -63,19 +65,19 @@ def convert_path_spec(name, value):
6365
path = path[:-1]
6466

6567
proc = subprocess.Popen([make, '-C', path],
66-
stdout = subprocess.PIPE,
67-
stderr = subprocess.PIPE)
68+
stdout=subprocess.PIPE,
69+
stderr=subprocess.PIPE)
6870
out, err = proc.communicate()
6971
i = proc.wait()
7072

7173
if i != 0:
72-
73-
print '----- ' + sys.argv[1] + """ --------------------
74+
print """\
75+
----- %s --------------------
7476
------ stdout ---------------------------------------------
75-
""" + out + """
77+
%s
7678
------ stderr ---------------------------------------------
77-
""" + err + """
79+
%s
7880
------ ---------------------------------------------
79-
"""
80-
sys.exit(i)
81+
""" % (sys.argv[1], out, err)
8182

83+
sys.exit(i)

0 commit comments

Comments
 (0)