Skip to content

Commit 22434f8

Browse files
committed
---
yaml --- r: 3482 b: refs/heads/master c: 8c36a76 h: refs/heads/master v: v3
1 parent 7a10009 commit 22434f8

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 5b7ce80ffa7c4f5795dfc9ed64fab8b2afd407b0
2+
refs/heads/master: 8c36a76626badd7c8e9cf2aee75f121f2acdb749

trunk/src/etc/combine-tests.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# can run it "fast": spawning zillions of windows processes is our major build
55
# bottleneck (and it doesn't hurt to run faster on other platforms as well).
66

7-
import sys, os, re
7+
import sys, os, re, codecs
88

99
def scrub(b):
1010
if sys.version_info >= (3,) and type(b) == bytes:
@@ -23,7 +23,7 @@ def scrub(b):
2323

2424
for t in os.listdir(run_pass):
2525
if t.endswith(".rs"):
26-
f = open(os.path.join(run_pass, t))
26+
f = codecs.open(os.path.join(run_pass, t), "r", "utf8")
2727
s = f.read()
2828
if not ("xfail-stage2" in s):
2929
stage2_tests.append(t)
@@ -38,8 +38,9 @@ def scrub(b):
3838
c.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
3939
c.write("#[link(name=\"run_pass_stage2\", vers=\"0.1\")];\n")
4040
for t in stage2_tests:
41-
c.write("mod t_%d = \"%s\";\n"
42-
% (i, os.path.join(run_pass, t)))
41+
p = os.path.join(run_pass, t)
42+
p = p.replace("\\", "\\\\")
43+
c.write("mod t_%d = \"%s\";\n" % (i, p))
4344
i += 1
4445
c.close()
4546

@@ -53,8 +54,9 @@ def scrub(b):
5354
d.write(" auto out = std::io::stdout();\n");
5455
i = 0
5556
for t in stage2_tests:
56-
d.write(" out.write_str(\"run-pass [stage2]: %s\\n\");\n"
57-
% os.path.join("test", "run-pass", t))
57+
p = os.path.join("test", "run-pass", t)
58+
p = p.replace("\\", "\\\\")
59+
d.write(" out.write_str(\"run-pass [stage2]: %s\\n\");\n" % p)
5860
if t in take_args:
5961
d.write(" t_%d::main([\"arg0\"]);\n" % i)
6062
else:

0 commit comments

Comments
 (0)