More fiddling with fast-check, now works on at least one windows machine.
This commit is contained in:
parent
5b7ce80ffa
commit
8c36a76626
1 changed files with 8 additions and 6 deletions
|
@ -4,7 +4,7 @@
|
||||||
# can run it "fast": spawning zillions of windows processes is our major build
|
# can run it "fast": spawning zillions of windows processes is our major build
|
||||||
# bottleneck (and it doesn't hurt to run faster on other platforms as well).
|
# bottleneck (and it doesn't hurt to run faster on other platforms as well).
|
||||||
|
|
||||||
import sys, os, re
|
import sys, os, re, codecs
|
||||||
|
|
||||||
def scrub(b):
|
def scrub(b):
|
||||||
if sys.version_info >= (3,) and type(b) == bytes:
|
if sys.version_info >= (3,) and type(b) == bytes:
|
||||||
|
@ -23,7 +23,7 @@ take_args = {}
|
||||||
|
|
||||||
for t in os.listdir(run_pass):
|
for t in os.listdir(run_pass):
|
||||||
if t.endswith(".rs"):
|
if t.endswith(".rs"):
|
||||||
f = open(os.path.join(run_pass, t))
|
f = codecs.open(os.path.join(run_pass, t), "r", "utf8")
|
||||||
s = f.read()
|
s = f.read()
|
||||||
if not ("xfail-stage2" in s):
|
if not ("xfail-stage2" in s):
|
||||||
stage2_tests.append(t)
|
stage2_tests.append(t)
|
||||||
|
@ -38,8 +38,9 @@ i = 0
|
||||||
c.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
|
c.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
|
||||||
c.write("#[link(name=\"run_pass_stage2\", vers=\"0.1\")];\n")
|
c.write("#[link(name=\"run_pass_stage2\", vers=\"0.1\")];\n")
|
||||||
for t in stage2_tests:
|
for t in stage2_tests:
|
||||||
c.write("mod t_%d = \"%s\";\n"
|
p = os.path.join(run_pass, t)
|
||||||
% (i, os.path.join(run_pass, t)))
|
p = p.replace("\\", "\\\\")
|
||||||
|
c.write("mod t_%d = \"%s\";\n" % (i, p))
|
||||||
i += 1
|
i += 1
|
||||||
c.close()
|
c.close()
|
||||||
|
|
||||||
|
@ -53,8 +54,9 @@ d.write("fn main() {\n");
|
||||||
d.write(" auto out = std::io::stdout();\n");
|
d.write(" auto out = std::io::stdout();\n");
|
||||||
i = 0
|
i = 0
|
||||||
for t in stage2_tests:
|
for t in stage2_tests:
|
||||||
d.write(" out.write_str(\"run-pass [stage2]: %s\\n\");\n"
|
p = os.path.join("test", "run-pass", t)
|
||||||
% os.path.join("test", "run-pass", t))
|
p = p.replace("\\", "\\\\")
|
||||||
|
d.write(" out.write_str(\"run-pass [stage2]: %s\\n\");\n" % p)
|
||||||
if t in take_args:
|
if t in take_args:
|
||||||
d.write(" t_%d::main([\"arg0\"]);\n" % i)
|
d.write(" t_%d::main([\"arg0\"]);\n" % i)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue