Skip to content

Commit 0dafb87

Browse files
committed
---
yaml --- r: 182768 b: refs/heads/beta c: 58d03ad h: refs/heads/master v: v3
1 parent 7fd1181 commit 0dafb87

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
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 04408fadd39b8fe75a97f08186be6701dd200799
34+
refs/heads/beta: 58d03ad95d2f02a693869faa1081091d6999cd93
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: eb836bf767aa1d8d4cba488a9091cde3c0ab4b2f

branches/beta/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)