Skip to content

Commit 06f4f6e

Browse files
committed
---
yaml --- r: 106226 b: refs/heads/auto c: f8f60d8 h: refs/heads/master v: v3
1 parent 7056307 commit 06f4f6e

File tree

677 files changed

+13527
-13250
lines changed

Some content is hidden

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

677 files changed

+13527
-13250
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: cda33346d0e9e4d1ff26163583831f96d42a4bc0
16+
refs/heads/auto: f8f60d80bf573cd8b4b5680b44c9cabe2b862f78
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ script: |
4141
fi &&
4242
make tidy &&
4343
make -j4 rustc-stage1 &&
44-
make check-stage1-std check-stage1-rpass check-stage1-cfail check-stage1-rfail
44+
make check-stage1-std check-stage1-rpass check-stage1-cfail check-stage1-rfail check-stage1-doc
4545
4646
env:
4747
global:

branches/auto/mk/dist.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ $(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
6565
dist-prepare-win: PREPARE_HOST=$(CFG_BUILD)
6666
dist-prepare-win: PREPARE_TARGETS=$(CFG_BUILD)
6767
dist-prepare-win: PREPARE_DEST_DIR=tmp/dist/win
68-
# On windows we're using stage3, unlike Unix...
69-
dist-prepare-win: PREPARE_STAGE=3
7068
dist-prepare-win: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
7169
dist-prepare-win: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
7270
dist-prepare-win: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
@@ -135,7 +133,6 @@ ifeq ($(CFG_OSTYPE), apple-darwin)
135133
dist-prepare-osx: PREPARE_HOST=$(CFG_BUILD)
136134
dist-prepare-osx: PREPARE_TARGETS=$(CFG_BUILD)
137135
dist-prepare-osx: PREPARE_DEST_DIR=tmp/dist/pkgroot
138-
dist-prepare-osx: PREPARE_STAGE=2
139136
dist-prepare-osx: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
140137
dist-prepare-osx: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
141138
dist-prepare-osx: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
@@ -165,7 +162,6 @@ dist-tar-bins: $(foreach host,$(CFG_HOST),dist/$(PKG_DIR)-$(host).tar.gz)
165162
define DEF_INSTALLER
166163
dist-install-dir-$(1): PREPARE_HOST=$(1)
167164
dist-install-dir-$(1): PREPARE_TARGETS=$(1)
168-
dist-install-dir-$(1): PREPARE_STAGE=2
169165
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_DIR)-$(1)
170166
dist-install-dir-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
171167
dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)

branches/auto/mk/install.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313
# mirror of the installation directory structure.
1414

1515
# The stage we install from
16-
ISTAGE = 2
16+
ISTAGE = $(PREPARE_STAGE)
1717

1818
install: PREPARE_HOST=$(CFG_BUILD)
1919
install: PREPARE_TARGETS=$(CFG_TARGET)
20-
install: PREPARE_STAGE=$(ISTAGE)
2120
install: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
2221
install: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
2322
install: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)

branches/auto/mk/prepare.mk

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@
2020
# PREPARE_TARGETS - the target triples, space separated
2121
# PREPARE_DEST_DIR - the directory to put the image
2222

23-
prepare: PREPARE_STAGE=2
23+
24+
# On windows we install from stage3, but on unix only stage2
25+
ifdef CFG_WINDOWSY_$(CFG_BUILD)
26+
PREPARE_STAGE=3
27+
else
28+
PREPARE_STAGE=2
29+
endif
30+
2431
prepare: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
2532
prepare: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
2633
prepare: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
@@ -43,15 +50,6 @@ DEFAULT_PREPARE_BIN_CMD = install -m755
4350
DEFAULT_PREPARE_LIB_CMD = install -m644
4451
DEFAULT_PREPARE_MAN_CMD = install -m644
4552

46-
# On windows we install from stage3, but on unix only stage2
47-
# Because of the way these rules are organized, preparing from any
48-
# stage requires all these stages to be built
49-
ifdef CFG_WINDOWSY_$(CFG_BUILD)
50-
PREPARE_STAGES=3
51-
else
52-
PREPARE_STAGES=2
53-
endif
54-
5553
# Create a directory
5654
# $(1) is the directory
5755
define PREPARE_DIR
@@ -102,9 +100,8 @@ prepare-host: prepare-host-tools
102100

103101
prepare-host-tools: \
104102
$(foreach tool, $(PREPARE_TOOLS),\
105-
$(foreach stage,$(PREPARE_STAGES),\
106-
$(foreach host,$(CFG_HOST),\
107-
prepare-host-tool-$(tool)-$(stage)-$(host))))
103+
$(foreach host,$(CFG_HOST),\
104+
prepare-host-tool-$(tool)-$(PREPARE_STAGE)-$(host)))
108105

109106
prepare-host-dirs: prepare-maybe-clean
110107
$(call PREPARE_DIR,$(PREPARE_DEST_BIN_DIR))
@@ -128,9 +125,8 @@ prepare-host-tool-$(1)-$(2)-$(3): prepare-maybe-clean \
128125
endef
129126

130127
$(foreach tool,$(PREPARE_TOOLS),\
131-
$(foreach stage,$(PREPARE_STAGES),\
132-
$(foreach host,$(CFG_HOST),\
133-
$(eval $(call DEF_PREPARE_HOST_TOOL,$(tool),$(stage),$(host))))))
128+
$(foreach host,$(CFG_HOST),\
129+
$(eval $(call DEF_PREPARE_HOST_TOOL,$(tool),$(PREPARE_STAGE),$(host)))))
134130

135131
# For host libraries only install dylibs, not rlibs since the host libs are only
136132
# used to support rustc and rustc uses dynamic linking
@@ -151,15 +147,13 @@ prepare-host-lib-$(1)-$(2)-$(3): prepare-maybe-clean \
151147
endef
152148

153149
$(foreach lib,$(CRATES),\
154-
$(foreach stage,$(PREPARE_STAGES),\
155-
$(foreach host,$(CFG_HOST),\
156-
$(eval $(call DEF_PREPARE_HOST_LIB,$(lib),$(stage),$(host))))))
150+
$(foreach host,$(CFG_HOST),\
151+
$(eval $(call DEF_PREPARE_HOST_LIB,$(lib),$(PREPARE_STAGE),$(host)))))
157152

158153
prepare-targets:\
159154
$(foreach host,$(CFG_HOST),\
160155
$(foreach target,$(CFG_TARGET),\
161-
$(foreach stage,$(PREPARE_STAGES),\
162-
prepare-target-$(target)-host-$(host)-$(stage))))
156+
prepare-target-$(target)-host-$(host)-$(PREPARE_STAGE)))
163157

164158
# $(1) is stage
165159
# $(2) is target
@@ -194,8 +188,7 @@ endef
194188

195189
$(foreach host,$(CFG_HOST),\
196190
$(foreach target,$(CFG_TARGET), \
197-
$(foreach stage,$(PREPARE_STAGES),\
198-
$(eval $(call DEF_PREPARE_TARGET_N,$(stage),$(target),$(host))))))
191+
$(eval $(call DEF_PREPARE_TARGET_N,$(PREPARE_STAGE),$(target),$(host)))))
199192

200193
prepare-maybe-clean:
201194
$(if $(findstring true,$(PREPARE_CLEAN)),\

branches/auto/src/compiletest/compiletest.rs

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
#[feature(phase)];
1313

1414
#[allow(non_camel_case_types)];
15+
#[allow(deprecated_owned_vector)]; // NOTE: remove after stage0
1516
#[deny(warnings)];
16-
#[allow(deprecated_owned_vector)];
1717

1818
extern crate test;
1919
extern crate getopts;
2020
#[phase(link, syntax)]
2121
extern crate log;
22+
extern crate green;
23+
extern crate rustuv;
2224

2325
use std::os;
2426
use std::io;
@@ -41,17 +43,20 @@ pub mod runtest;
4143
pub mod common;
4244
pub mod errors;
4345

46+
#[start]
47+
fn start(argc: int, argv: **u8) -> int { green::start(argc, argv, main) }
48+
4449
pub fn main() {
4550
let args = os::args();
46-
let config = parse_config(args);
51+
let config = parse_config(args.move_iter().collect());
4752
log_config(&config);
4853
run_tests(&config);
4954
}
5055

51-
pub fn parse_config(args: ~[~str]) -> config {
56+
pub fn parse_config(args: Vec<~str> ) -> config {
5257

53-
let groups : ~[getopts::OptGroup] =
54-
~[reqopt("", "compile-lib-path", "path to host shared libraries", "PATH"),
58+
let groups : Vec<getopts::OptGroup> =
59+
vec!(reqopt("", "compile-lib-path", "path to host shared libraries", "PATH"),
5560
reqopt("", "run-lib-path", "path to target shared libraries", "PATH"),
5661
reqopt("", "rustc-path", "path to rustc to use for compiling", "PATH"),
5762
optopt("", "clang-path", "path to executable for codegen tests", "PATH"),
@@ -79,28 +84,27 @@ pub fn parse_config(args: ~[~str]) -> config {
7984
optopt("", "adb-path", "path to the android debugger", "PATH"),
8085
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
8186
optopt("", "test-shard", "run shard A, of B shards, worth of the testsuite", "A.B"),
82-
optflag("h", "help", "show this message"),
83-
];
87+
optflag("h", "help", "show this message"));
8488

8589
assert!(!args.is_empty());
86-
let argv0 = args[0].clone();
90+
let argv0 = (*args.get(0)).clone();
8791
let args_ = args.tail();
88-
if args[1] == ~"-h" || args[1] == ~"--help" {
92+
if *args.get(1) == ~"-h" || *args.get(1) == ~"--help" {
8993
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
90-
println!("{}", getopts::usage(message, groups));
94+
println!("{}", getopts::usage(message, groups.as_slice()));
9195
println!("");
9296
fail!()
9397
}
9498

9599
let matches =
96-
&match getopts::getopts(args_, groups) {
100+
&match getopts::getopts(args_, groups.as_slice()) {
97101
Ok(m) => m,
98102
Err(f) => fail!("{}", f.to_err_msg())
99103
};
100104

101105
if matches.opt_present("h") || matches.opt_present("help") {
102106
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
103-
println!("{}", getopts::usage(message, groups));
107+
println!("{}", getopts::usage(message, groups.as_slice()));
104108
println!("");
105109
fail!()
106110
}
@@ -123,7 +127,7 @@ pub fn parse_config(args: ~[~str]) -> config {
123127
run_ignored: matches.opt_present("ignored"),
124128
filter:
125129
if !matches.free.is_empty() {
126-
Some(matches.free[0].clone())
130+
Some((*matches.free.get(0)).clone())
127131
} else {
128132
None
129133
},
@@ -239,7 +243,7 @@ pub fn run_tests(config: &config) {
239243
// parallel (especially when we have lots and lots of child processes).
240244
// For context, see #8904
241245
io::test::raise_fd_limit();
242-
let res = test::run_tests_console(&opts, tests);
246+
let res = test::run_tests_console(&opts, tests.move_iter().collect());
243247
match res {
244248
Ok(true) => {}
245249
Ok(false) => fail!("Some tests failed"),
@@ -263,10 +267,10 @@ pub fn test_opts(config: &config) -> test::TestOpts {
263267
}
264268
}
265269

266-
pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
270+
pub fn make_tests(config: &config) -> Vec<test::TestDescAndFn> {
267271
debug!("making tests from {}",
268272
config.src_base.display());
269-
let mut tests = ~[];
273+
let mut tests = Vec::new();
270274
let dirs = fs::readdir(&config.src_base).unwrap();
271275
for file in dirs.iter() {
272276
let file = file.clone();
@@ -288,10 +292,10 @@ pub fn is_test(config: &config, testfile: &Path) -> bool {
288292
// Pretty-printer does not work with .rc files yet
289293
let valid_extensions =
290294
match config.mode {
291-
mode_pretty => ~[~".rs"],
292-
_ => ~[~".rc", ~".rs"]
295+
mode_pretty => vec!(~".rs"),
296+
_ => vec!(~".rc", ~".rs")
293297
};
294-
let invalid_prefixes = ~[~".", ~"#", ~"~"];
298+
let invalid_prefixes = vec!(~".", ~"#", ~"~");
295299
let name = testfile.filename_str().unwrap();
296300

297301
let mut valid = false;

branches/auto/src/compiletest/errors.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ use std::io::{BufferedReader, File};
1313
pub struct ExpectedError { line: uint, kind: ~str, msg: ~str }
1414

1515
// Load any test directives embedded in the file
16-
pub fn load_errors(testfile: &Path) -> ~[ExpectedError] {
16+
pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
1717

18-
let mut error_patterns = ~[];
18+
let mut error_patterns = Vec::new();
1919
let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
2020
let mut line_num = 1u;
2121
for ln in rdr.lines() {
@@ -25,12 +25,12 @@ pub fn load_errors(testfile: &Path) -> ~[ExpectedError] {
2525
return error_patterns;
2626
}
2727

28-
fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
28+
fn parse_expected(line_num: uint, line: ~str) -> Vec<ExpectedError> {
2929
let line = line.trim();
3030
let error_tag = ~"//~";
3131
let mut idx;
3232
match line.find_str(error_tag) {
33-
None => return ~[],
33+
None => return Vec::new(),
3434
Some(nn) => { idx = (nn as uint) + error_tag.len(); }
3535
}
3636

@@ -57,6 +57,6 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
5757

5858
debug!("line={} kind={} msg={}", line_num - adjust_line, kind, msg);
5959

60-
return ~[ExpectedError{line: line_num - adjust_line, kind: kind,
61-
msg: msg}];
60+
return vec!(ExpectedError{line: line_num - adjust_line, kind: kind,
61+
msg: msg});
6262
}

branches/auto/src/compiletest/header.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ use util;
1414

1515
pub struct TestProps {
1616
// Lines that should be expected, in order, on standard out
17-
error_patterns: ~[~str],
17+
error_patterns: Vec<~str> ,
1818
// Extra flags to pass to the compiler
1919
compile_flags: Option<~str>,
2020
// If present, the name of a file that this test should match when
2121
// pretty-printed
2222
pp_exact: Option<Path>,
2323
// Modules from aux directory that should be compiled
24-
aux_builds: ~[~str],
24+
aux_builds: Vec<~str> ,
2525
// Environment settings to use during execution
26-
exec_env: ~[(~str,~str)],
26+
exec_env: Vec<(~str,~str)> ,
2727
// Commands to be given to the debugger, when testing debug info
28-
debugger_cmds: ~[~str],
28+
debugger_cmds: Vec<~str> ,
2929
// Lines to check if they appear in the expected debugger output
30-
check_lines: ~[~str],
30+
check_lines: Vec<~str> ,
3131
// Flag to force a crate to be built with the host architecture
3232
force_host: bool,
3333
// Check stdout for error-pattern output as well as stderr
@@ -38,13 +38,13 @@ pub struct TestProps {
3838

3939
// Load any test directives embedded in the file
4040
pub fn load_props(testfile: &Path) -> TestProps {
41-
let mut error_patterns = ~[];
42-
let mut aux_builds = ~[];
43-
let mut exec_env = ~[];
41+
let mut error_patterns = Vec::new();
42+
let mut aux_builds = Vec::new();
43+
let mut exec_env = Vec::new();
4444
let mut compile_flags = None;
4545
let mut pp_exact = None;
46-
let mut debugger_cmds = ~[];
47-
let mut check_lines = ~[];
46+
let mut debugger_cmds = Vec::new();
47+
let mut check_lines = Vec::new();
4848
let mut force_host = false;
4949
let mut check_stdout = false;
5050
let mut no_prefer_dynamic = false;
@@ -183,7 +183,7 @@ fn parse_no_prefer_dynamic(line: &str) -> bool {
183183
fn parse_exec_env(line: &str) -> Option<(~str, ~str)> {
184184
parse_name_value_directive(line, ~"exec-env").map(|nv| {
185185
// nv is either FOO or FOO=BAR
186-
let mut strs: ~[~str] = nv.splitn('=', 1).map(|s| s.to_owned()).collect();
186+
let mut strs: Vec<~str> = nv.splitn('=', 1).map(|s| s.to_owned()).collect();
187187

188188
match strs.len() {
189189
1u => (strs.pop().unwrap(), ~""),

0 commit comments

Comments
 (0)