Skip to content

Commit 27202e1

Browse files
committed
---
yaml --- r: 110225 b: refs/heads/auto c: e6b1cc6 h: refs/heads/master i: 110223: 453e8bc v: v3
1 parent ee6bf5d commit 27202e1

File tree

374 files changed

+777
-593
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

374 files changed

+777
-593
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: e415c25bcd81dc1f9a5a3d25d9b48ed2d545336b
16+
refs/heads/auto: e6b1cc6ae194449e5231bb13d8853af1efbe52c4
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ documentation.
5959

6060
[repo]: https://github.com/mozilla/rust
6161
[tarball]: http://static.rust-lang.org/dist/rust-nightly.tar.gz
62-
[tutorial]: http://static.rust-lang.org/doc/master/tutorial.html
62+
[tutorial]: http://static.rust-lang.org/doc/nightly/tutorial.html
6363

6464
## Notes
6565

branches/auto/mk/tests.mk

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass \
183183
check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
184184
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
185185

186-
# NOTE: Remove after reprogramming windows bots
187-
check-fast: check-lite
188-
189186
.PHONY: cleantmptestlogs cleantestlibs
190187

191188
cleantmptestlogs:
@@ -878,9 +875,69 @@ $(foreach crate,$(TEST_CRATES), \
878875
$(eval $(call DEF_CHECK_CRATE,$(crate))))
879876

880877
######################################################################
881-
# RMAKE rules
878+
# check-fast rules
882879
######################################################################
883880

881+
FT := run_pass_stage2
882+
FT_LIB := $(call CFG_LIB_NAME_$(CFG_BUILD),$(FT))
883+
FT_DRIVER := $(FT)_driver
884+
885+
GENERATED += tmp/$(FT).rc tmp/$(FT_DRIVER).rs
886+
887+
tmp/$(FT).rc tmp/$(FT_DRIVER).rs: \
888+
$(RPASS_TESTS) \
889+
$(S)src/etc/combine-tests.py
890+
@$(call E, check: building combined stage2 test runner)
891+
$(Q)$(CFG_PYTHON) $(S)src/etc/combine-tests.py
892+
893+
define DEF_CHECK_FAST_FOR_T_H
894+
# $(1) unused
895+
# $(2) target triple
896+
# $(3) host triple
897+
898+
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB): \
899+
tmp/$$(FT).rc \
900+
$$(SREQ2_T_$(2)_H_$(3))
901+
@$$(call E, oxidize: $$@)
902+
$$(STAGE2_T_$(2)_H_$(3)) --crate-type=dylib --out-dir $$(@D) $$< \
903+
-L "$$(RT_OUTPUT_DIR_$(2))"
904+
905+
$(3)/test/$$(FT_DRIVER)-$(2)$$(X_$(2)): \
906+
tmp/$$(FT_DRIVER).rs \
907+
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB) \
908+
$$(SREQ2_T_$(2)_H_$(3))
909+
@$$(call E, oxidize: $$@ $$<)
910+
$$(STAGE2_T_$(2)_H_$(3)) -o $$@ $$< \
911+
-L "$$(RT_OUTPUT_DIR_$(2))"
912+
913+
$(3)/test/$$(FT_DRIVER)-$(2).out: \
914+
$(3)/test/$$(FT_DRIVER)-$(2)$$(X_$(2)) \
915+
$$(SREQ2_T_$(2)_H_$(3))
916+
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(2),$(3)) \
917+
--logfile tmp/$$(FT_DRIVER)-$(2).log
918+
919+
check-fast-T-$(2)-H-$(3): \
920+
$(3)/test/$$(FT_DRIVER)-$(2).out
921+
922+
endef
923+
924+
$(foreach host,$(CFG_HOST), \
925+
$(eval $(foreach target,$(CFG_TARGET), \
926+
$(eval $(call DEF_CHECK_FAST_FOR_T_H,,$(target),$(host))))))
927+
928+
check-fast: tidy check-fast-H-$(CFG_BUILD) \
929+
$(foreach crate,$(TARGET_CRATES),check-stage2-$(crate))
930+
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
931+
932+
define DEF_CHECK_FAST_FOR_H
933+
934+
check-fast-H-$(1): check-fast-T-$(1)-H-$(1)
935+
936+
endef
937+
938+
$(foreach host,$(CFG_HOST), \
939+
$(eval $(call DEF_CHECK_FAST_FOR_H,$(host))))
940+
884941
RMAKE_TESTS := $(shell ls -d $(S)src/test/run-make/*/)
885942
RMAKE_TESTS := $(RMAKE_TESTS:$(S)src/test/run-make/%/=%)
886943

@@ -904,7 +961,6 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
904961
@rm -rf $(3)/test/run-make/$$*
905962
@mkdir -p $(3)/test/run-make/$$*
906963
$$(Q)$$(CFG_PYTHON) $(S)src/etc/maketest.py $$(dir $$<) \
907-
$$(MAKE) \
908964
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
909965
$(3)/test/run-make/$$* \
910966
"$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \

branches/auto/src/compiletest/procsrv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ pub fn run(lib_path: &str,
8484

8585
Some(Result {
8686
status: status,
87-
out: str::from_utf8(output.as_slice()).unwrap().to_owned(),
88-
err: str::from_utf8(error.as_slice()).unwrap().to_owned()
87+
out: str::from_utf8_owned(output).unwrap(),
88+
err: str::from_utf8_owned(error).unwrap()
8989
})
9090
},
9191
Err(..) => None

branches/auto/src/compiletest/runtest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
153153
match props.pp_exact { Some(_) => 1, None => 2 };
154154

155155
let src = File::open(testfile).read_to_end().unwrap();
156-
let src = str::from_utf8(src.as_slice()).unwrap().to_owned();
156+
let src = str::from_utf8_owned(src).unwrap();
157157
let mut srcs = vec!(src);
158158

159159
let mut round = 0;
@@ -177,7 +177,7 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
177177
Some(ref file) => {
178178
let filepath = testfile.dir_path().join(file);
179179
let s = File::open(&filepath).read_to_end().unwrap();
180-
str::from_utf8(s.as_slice()).unwrap().to_owned()
180+
str::from_utf8_owned(s).unwrap()
181181
}
182182
None => { (*srcs.get(srcs.len() - 2u)).clone() }
183183
};
@@ -1163,7 +1163,7 @@ fn disassemble_extract(config: &config, _props: &TestProps,
11631163
11641164
fn count_extracted_lines(p: &Path) -> uint {
11651165
let x = File::open(&p.with_extension("ll")).read_to_end().unwrap();
1166-
let x = str::from_utf8(x.as_slice()).unwrap();
1166+
let x = str::from_utf8_owned(x).unwrap();
11671167
x.lines().len()
11681168
}
11691169

branches/auto/src/doc/complement-cheatsheet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Use the [`lines`](http://static.rust-lang.org/doc/master/std/io/trait.Buffer.htm
9696
use std::io::BufferedReader;
9797
# use std::io::MemReader;
9898
99-
# let reader = MemReader::new(vec!());
99+
# let reader = MemReader::new(~[]);
100100
101101
let mut reader = BufferedReader::new(reader);
102102
for line in reader.lines() {
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Copyright 2011-2014 The Rust Project Developers. See the COPYRIGHT
2+
# file at the top-level directory of this distribution and at
3+
# http://rust-lang.org/COPYRIGHT.
4+
#
5+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
# option. This file may not be copied, modified, or distributed
9+
# except according to those terms.
10+
11+
# This combines all the working run-pass tests into a single large crate so we
12+
# can run it "fast": spawning zillions of windows processes is our major build
13+
# bottleneck (and it doesn't hurt to run faster on other platforms as well).
14+
15+
import sys
16+
import os
17+
import codecs
18+
19+
20+
def scrub(b):
21+
if sys.version_info >= (3,) and type(b) == bytes:
22+
return b.decode('ascii')
23+
else:
24+
return b
25+
26+
src_dir = scrub(os.getenv("CFG_SRC_DIR"))
27+
if not src_dir:
28+
raise Exception("missing env var CFG_SRC_DIR")
29+
30+
run_pass = os.path.join(src_dir, "src", "test", "run-pass")
31+
run_pass = os.path.abspath(run_pass)
32+
stage2_tests = []
33+
34+
for t in os.listdir(run_pass):
35+
if t.endswith(".rs") and not (
36+
t.startswith(".") or t.startswith("#") or t.startswith("~")):
37+
f = codecs.open(os.path.join(run_pass, t), "r", "utf8")
38+
s = f.read()
39+
if not ("ignore-test" in s or
40+
"ignore-fast" in s or
41+
"ignore-win32" in s):
42+
if not "pub fn main" in s and "fn main" in s:
43+
print("Warning: no public entry point in " + t)
44+
stage2_tests.append(t)
45+
f.close()
46+
47+
stage2_tests.sort()
48+
49+
c = open("tmp/run_pass_stage2.rc", "w")
50+
i = 0
51+
c.write(
52+
"""
53+
// AUTO-GENERATED FILE: DO NOT EDIT
54+
#[crate_id=\"run_pass_stage2#0.1\"];
55+
#[crate_id=\"run_pass_stage2#0.1\"];
56+
#[feature(globs, macro_rules, struct_variant, managed_boxes)];
57+
#![allow(warnings)]
58+
extern crate collections;
59+
"""
60+
)
61+
for t in stage2_tests:
62+
p = os.path.join(run_pass, t)
63+
p = p.replace("\\", "\\\\")
64+
c.write("#[path = \"%s\"]" % p)
65+
c.write("pub mod t_%d;\n" % i)
66+
i += 1
67+
c.close()
68+
69+
70+
d = open("tmp/run_pass_stage2_driver.rs", "w")
71+
d.write(
72+
"""
73+
// AUTO-GENERATED FILE: DO NOT EDIT
74+
#[feature(globs, managed_boxes)];
75+
extern crate run_pass_stage2;
76+
use run_pass_stage2::*;
77+
use std::io;
78+
use std::io::Writer;
79+
#[allow(warnings)]
80+
fn main() {
81+
let mut out = io::stdout();
82+
"""
83+
)
84+
i = 0
85+
for t in stage2_tests:
86+
p = os.path.join("test", "run-pass", t)
87+
p = p.replace("\\", "\\\\")
88+
d.write(" out.write(\"run-pass [stage2]: %s\\n\".as_bytes());\n" % p)
89+
d.write(" t_%d::main();\n" % i)
90+
i += 1
91+
d.write("}\n")

branches/auto/src/etc/kate/rust.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
<RegExpr String="[0-9][0-9_]*\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?" attribute="Number" context="#stay"/>
203203
<RegExpr String="[0-9][0-9_]*&rustIntSuf;" attribute="Number" context="#stay"/>
204204
<Detect2Chars char="#" char1="[" attribute="Attribute" context="Attribute" beginRegion="Attribute"/>
205-
<StringDetect String="#![" attribute="Attribute" context="Attribute" beginRegion="Attribute"/>
205+
<Detect2Chars char="#" char1="!" char2="[" attribute="Attribute" context="Attribute" beginRegion="Attribute"/>
206206
<RegExpr String="&rustIdent;::" attribute="Scope"/>
207207
<RegExpr String="&rustIdent;!" attribute="Macro"/>
208208
<RegExpr String="&apos;&rustIdent;(?!&apos;)" attribute="Lifetime"/>

branches/auto/src/etc/maketest.py

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

15-
# FIXME #12303 these tests are broken on windows
16-
if os.name == 'nt':
17-
print 'ignoring make tests on windows'
18-
sys.exit(0)
19-
20-
make = sys.argv[2]
21-
os.putenv('RUSTC', os.path.abspath(sys.argv[3]))
22-
os.putenv('TMPDIR', os.path.abspath(sys.argv[4]))
23-
os.putenv('CC', sys.argv[5])
24-
os.putenv('RUSTDOC', os.path.abspath(sys.argv[6]))
25-
filt = sys.argv[7]
26-
ldpath = sys.argv[8]
15+
os.putenv('RUSTC', os.path.abspath(sys.argv[2]))
16+
os.putenv('TMPDIR', os.path.abspath(sys.argv[3]))
17+
os.putenv('CC', sys.argv[4])
18+
os.putenv('RUSTDOC', os.path.abspath(sys.argv[5]))
19+
filt = sys.argv[6]
20+
ldpath = sys.argv[7]
2721
if ldpath != '':
2822
os.putenv(ldpath.split('=')[0], ldpath.split('=')[1])
2923

3024
if not filt in sys.argv[1]:
3125
sys.exit(0)
3226
print('maketest: ' + os.path.basename(os.path.dirname(sys.argv[1])))
3327

34-
proc = subprocess.Popen([make, '-C', sys.argv[1]],
28+
proc = subprocess.Popen(['make', '-C', sys.argv[1]],
3529
stdout = subprocess.PIPE,
3630
stderr = subprocess.PIPE)
3731
out, err = proc.communicate()

0 commit comments

Comments
 (0)