Skip to content

Commit f4d35d3

Browse files
committed
---
yaml --- r: 109247 b: refs/heads/dist-snap c: 092afdb h: refs/heads/master i: 109245: f842a25 109243: bae12d4 109239: b2282a2 109231: 5888e5b 109215: eb88684 109183: 997990b v: v3
1 parent 5a5c6f5 commit f4d35d3

File tree

372 files changed

+3876
-2989
lines changed

Some content is hidden

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

372 files changed

+3876
-2989
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 811257eda5edd7d7d9586a9be4f45a2d4dfa4701
9+
refs/heads/dist-snap: 092afdba3c81d122b4b24aa49dd445023b5daef6
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.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/dist-snap/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/dist-snap/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/dist-snap/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/dist-snap/src/compiletest/compiletest.rs

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

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

1718
extern crate test;
1819
extern crate getopts;
1920
#[phase(link, syntax)]
2021
extern crate log;
22+
extern crate green;
23+
extern crate rustuv;
2124

2225
use std::os;
2326
use std::io;
@@ -40,17 +43,20 @@ pub mod runtest;
4043
pub mod common;
4144
pub mod errors;
4245

46+
#[start]
47+
fn start(argc: int, argv: **u8) -> int { green::start(argc, argv, main) }
48+
4349
pub fn main() {
4450
let args = os::args();
45-
let config = parse_config(args);
51+
let config = parse_config(args.move_iter().collect());
4652
log_config(&config);
4753
run_tests(&config);
4854
}
4955

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

52-
let groups : ~[getopts::OptGroup] =
53-
~[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"),
5460
reqopt("", "run-lib-path", "path to target shared libraries", "PATH"),
5561
reqopt("", "rustc-path", "path to rustc to use for compiling", "PATH"),
5662
optopt("", "clang-path", "path to executable for codegen tests", "PATH"),
@@ -78,28 +84,27 @@ pub fn parse_config(args: ~[~str]) -> config {
7884
optopt("", "adb-path", "path to the android debugger", "PATH"),
7985
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
8086
optopt("", "test-shard", "run shard A, of B shards, worth of the testsuite", "A.B"),
81-
optflag("h", "help", "show this message"),
82-
];
87+
optflag("h", "help", "show this message"));
8388

8489
assert!(!args.is_empty());
85-
let argv0 = args[0].clone();
90+
let argv0 = (*args.get(0)).clone();
8691
let args_ = args.tail();
87-
if args[1] == ~"-h" || args[1] == ~"--help" {
92+
if *args.get(1) == ~"-h" || *args.get(1) == ~"--help" {
8893
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
89-
println!("{}", getopts::usage(message, groups));
94+
println!("{}", getopts::usage(message, groups.as_slice()));
9095
println!("");
9196
fail!()
9297
}
9398

9499
let matches =
95-
&match getopts::getopts(args_, groups) {
100+
&match getopts::getopts(args_, groups.as_slice()) {
96101
Ok(m) => m,
97102
Err(f) => fail!("{}", f.to_err_msg())
98103
};
99104

100105
if matches.opt_present("h") || matches.opt_present("help") {
101106
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
102-
println!("{}", getopts::usage(message, groups));
107+
println!("{}", getopts::usage(message, groups.as_slice()));
103108
println!("");
104109
fail!()
105110
}
@@ -122,7 +127,7 @@ pub fn parse_config(args: ~[~str]) -> config {
122127
run_ignored: matches.opt_present("ignored"),
123128
filter:
124129
if !matches.free.is_empty() {
125-
Some(matches.free[0].clone())
130+
Some((*matches.free.get(0)).clone())
126131
} else {
127132
None
128133
},
@@ -238,7 +243,7 @@ pub fn run_tests(config: &config) {
238243
// parallel (especially when we have lots and lots of child processes).
239244
// For context, see #8904
240245
io::test::raise_fd_limit();
241-
let res = test::run_tests_console(&opts, tests);
246+
let res = test::run_tests_console(&opts, tests.move_iter().collect());
242247
match res {
243248
Ok(true) => {}
244249
Ok(false) => fail!("Some tests failed"),
@@ -262,10 +267,10 @@ pub fn test_opts(config: &config) -> test::TestOpts {
262267
}
263268
}
264269

265-
pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
270+
pub fn make_tests(config: &config) -> Vec<test::TestDescAndFn> {
266271
debug!("making tests from {}",
267272
config.src_base.display());
268-
let mut tests = ~[];
273+
let mut tests = Vec::new();
269274
let dirs = fs::readdir(&config.src_base).unwrap();
270275
for file in dirs.iter() {
271276
let file = file.clone();
@@ -287,10 +292,10 @@ pub fn is_test(config: &config, testfile: &Path) -> bool {
287292
// Pretty-printer does not work with .rc files yet
288293
let valid_extensions =
289294
match config.mode {
290-
mode_pretty => ~[~".rs"],
291-
_ => ~[~".rc", ~".rs"]
295+
mode_pretty => vec!(~".rs"),
296+
_ => vec!(~".rc", ~".rs")
292297
};
293-
let invalid_prefixes = ~[~".", ~"#", ~"~"];
298+
let invalid_prefixes = vec!(~".", ~"#", ~"~");
294299
let name = testfile.filename_str().unwrap();
295300

296301
let mut valid = false;

branches/dist-snap/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/dist-snap/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)