Skip to content

Commit 1d9a848

Browse files
committed
---
yaml --- r: 179161 b: refs/heads/auto c: ccb513e h: refs/heads/master i: 179159: 9cb45ee v: v3
1 parent 25054df commit 1d9a848

File tree

570 files changed

+3746
-4089
lines changed

Some content is hidden

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

570 files changed

+3746
-4089
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 703364f2144c4055e5851fc5400625f086210f27
13+
refs/heads/auto: ccb513e582cf032dcc220eadd31aa36ac6179a7a
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/Makefile.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@
5959
# * check-stage$(stage)-$(crate) - Test a crate in a specific stage
6060
# * check-stage$(stage)-{rpass,rfail,cfail,rmake,...} - Run tests in src/test/
6161
# * check-stage1-T-$(target)-H-$(host) - Run cross-compiled-tests
62-
# * tidy-basic - show file / line stats
63-
# * tidy-errors - show the highest rustc error code
64-
# * tidy-features - show the status of language and lib features
6562
#
6663
# Then mix in some of these environment variables to harness the
6764
# ultimate power of The Rust Build System.

branches/auto/man/rustc.1

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,10 @@ Display the help message
1818
\fB\-\-cfg\fR SPEC
1919
Configure the compilation environment
2020
.TP
21-
\fB\-L\fR [KIND=]PATH
22-
Add a directory to the library search path. The optional KIND can be one of:
23-
dependency = only lookup transitive dependencies here
24-
crate = only lookup local `extern crate` directives here
25-
native = only lookup native libraries here
26-
framework = only look for OSX frameworks here
27-
all = look for anything here (the default)
28-
.TP
29-
\fB\-l\fR [KIND=]NAME
21+
\fB\-L\fR PATH
22+
Add a directory to the library search path
23+
.TP
24+
\fB\-l\fR NAME[:KIND]
3025
Link the generated crate(s) to the specified native library NAME. The optional
3126
KIND can be one of, static, dylib, or framework. If omitted, dylib is assumed.
3227
.TP

branches/auto/mk/main.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ endif
7272
# numbers and dots here
7373
CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
7474

75-
CFG_INFO := $(info cfg: version $(CFG_VERSION))
7675

7776
######################################################################
7877
# More configuration
@@ -180,7 +179,6 @@ endif
180179

181180
ifndef CFG_DISABLE_VALGRIND_RPASS
182181
$(info cfg: enabling valgrind run-pass tests (CFG_ENABLE_VALGRIND_RPASS))
183-
$(info cfg: valgrind-rpass command set to $(CFG_VALGRIND))
184182
CFG_VALGRIND_RPASS :=$(CFG_VALGRIND)
185183
else
186184
CFG_VALGRIND_RPASS :=

branches/auto/mk/tests.mk

Lines changed: 51 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ $(foreach file,$(wildcard $(S)src/doc/trpl/*.md), \
162162
######################################################################
163163

164164
# The main testing target. Tests lots of stuff.
165-
check: cleantmptestlogs cleantestlibs all check-stage2 tidy
166-
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
165+
check: cleantmptestlogs cleantestlibs check-notidy tidy
167166

168167
# As above but don't bother running tidy.
169168
check-notidy: cleantmptestlogs cleantestlibs all check-stage2
@@ -236,24 +235,57 @@ cleantestlibs:
236235
######################################################################
237236

238237
ifdef CFG_NOTIDY
239-
.PHONY: tidy
240238
tidy:
241239
else
242240

243-
# Run the tidy script in multiple parts to avoid huge 'echo' commands
244-
.PHONY: tidy
245-
tidy: tidy-basic tidy-binaries tidy-errors tidy-features
246-
247-
endif
241+
ALL_CS := $(wildcard $(S)src/rt/*.cpp \
242+
$(S)src/rt/*/*.cpp \
243+
$(S)src/rt/*/*/*.cpp \
244+
$(S)src/rustllvm/*.cpp)
245+
ALL_CS := $(filter-out $(S)src/rt/miniz.cpp \
246+
$(wildcard $(S)src/rt/hoedown/src/*.c) \
247+
$(wildcard $(S)src/rt/hoedown/bin/*.c) \
248+
,$(ALL_CS))
249+
ALL_HS := $(wildcard $(S)src/rt/*.h \
250+
$(S)src/rt/*/*.h \
251+
$(S)src/rt/*/*/*.h \
252+
$(S)src/rustllvm/*.h)
253+
ALL_HS := $(filter-out $(S)src/rt/valgrind/valgrind.h \
254+
$(S)src/rt/valgrind/memcheck.h \
255+
$(S)src/rt/msvc/typeof.h \
256+
$(S)src/rt/msvc/stdint.h \
257+
$(S)src/rt/msvc/inttypes.h \
258+
$(wildcard $(S)src/rt/hoedown/src/*.h) \
259+
$(wildcard $(S)src/rt/hoedown/bin/*.h) \
260+
,$(ALL_HS))
248261

249-
.PHONY: tidy-basic
250-
tidy-basic:
262+
# Run the tidy script in multiple parts to avoid huge 'echo' commands
263+
tidy:
251264
@$(call E, check: formatting)
252-
$(Q) $(CFG_PYTHON) $(S)src/etc/tidy.py $(S)src/
253-
254-
.PHONY: tidy-binaries
255-
tidy-binaries:
256-
@$(call E, check: binaries)
265+
$(Q)find $(S)src -name '*.r[sc]' \
266+
-and -not -regex '^$(S)src/jemalloc.*' \
267+
-and -not -regex '^$(S)src/libuv.*' \
268+
-and -not -regex '^$(S)src/llvm.*' \
269+
-and -not -regex '^$(S)src/gyp.*' \
270+
-and -not -regex '^$(S)src/libbacktrace.*' \
271+
-print0 \
272+
| xargs -0 -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
273+
$(Q)find $(S)src/etc -name '*.py' \
274+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
275+
$(Q)find $(S)src/doc -name '*.js' \
276+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
277+
$(Q)find $(S)src/etc -name '*.sh' \
278+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
279+
$(Q)find $(S)src/etc -name '*.pl' \
280+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
281+
$(Q)find $(S)src/etc -name '*.c' \
282+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
283+
$(Q)find $(S)src/etc -name '*.h' \
284+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
285+
$(Q)echo $(ALL_CS) \
286+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
287+
$(Q)echo $(ALL_HS) \
288+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
257289
$(Q)find $(S)src -type f -perm +a+x \
258290
-not -name '*.rs' -and -not -name '*.py' \
259291
-and -not -name '*.sh' \
@@ -268,18 +300,13 @@ tidy-binaries:
268300
| grep '^$(S)src/libbacktrace' -v \
269301
| grep '^$(S)src/rust-installer' -v \
270302
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
271-
272-
.PHONY: tidy-errors
273-
tidy-errors:
274-
@$(call E, check: extended errors)
275303
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
276-
277-
.PHONY: tidy-features
278-
tidy-features:
279-
@$(call E, check: feature sanity)
280304
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
281305

282306

307+
endif
308+
309+
283310
######################################################################
284311
# Sets of tests
285312
######################################################################
@@ -612,6 +639,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
612639

613640
ifdef CFG_VALGRIND_RPASS
614641
ifdef GOOD_VALGRIND_$(2)
642+
$(info cfg: valgrind-path set to $(CFG_VALGRIND_RPASS))
615643
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) += --valgrind-path "$(CFG_VALGRIND_RPASS)"
616644
endif
617645
endif

branches/auto/src/compiletest/compiletest.rs

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,31 +97,28 @@ pub fn parse_config(args: Vec<String> ) -> Config {
9797
assert!(!args.is_empty());
9898
let argv0 = args[0].clone();
9999
let args_ = args.tail();
100-
if args[1] == "-h" || args[1] == "--help" {
100+
if args[1].as_slice() == "-h" || args[1].as_slice() == "--help" {
101101
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
102-
println!("{}", getopts::usage(&message, &groups));
102+
println!("{}", getopts::usage(message.as_slice(), groups.as_slice()));
103103
println!("");
104104
panic!()
105105
}
106106

107107
let matches =
108-
&match getopts::getopts(args_, &groups) {
108+
&match getopts::getopts(args_.as_slice(), groups.as_slice()) {
109109
Ok(m) => m,
110110
Err(f) => panic!("{:?}", f)
111111
};
112112

113113
if matches.opt_present("h") || matches.opt_present("help") {
114114
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
115-
println!("{}", getopts::usage(&message, &groups));
115+
println!("{}", getopts::usage(message.as_slice(), groups.as_slice()));
116116
println!("");
117117
panic!()
118118
}
119119

120120
fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
121-
match m.opt_str(nm) {
122-
Some(s) => Path::new(s),
123-
None => panic!("no option (=path) found for {}", nm),
124-
}
121+
Path::new(m.opt_str(nm).unwrap())
125122
}
126123

127124
let filter = if !matches.free.is_empty() {
@@ -159,9 +156,9 @@ pub fn parse_config(args: Vec<String> ) -> Config {
159156
adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")),
160157
adb_device_status:
161158
"arm-linux-androideabi" ==
162-
opt_str2(matches.opt_str("target")) &&
159+
opt_str2(matches.opt_str("target")).as_slice() &&
163160
"(none)" !=
164-
opt_str2(matches.opt_str("adb-test-dir")) &&
161+
opt_str2(matches.opt_str("adb-test-dir")).as_slice() &&
165162
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
166163
lldb_python_dir: matches.opt_str("lldb-python-dir"),
167164
verbose: matches.opt_present("verbose"),
@@ -204,7 +201,7 @@ pub fn log_config(config: &Config) {
204201
pub fn opt_str<'a>(maybestr: &'a Option<String>) -> &'a str {
205202
match *maybestr {
206203
None => "(none)",
207-
Some(ref s) => s,
204+
Some(ref s) => s.as_slice(),
208205
}
209206
}
210207

@@ -216,7 +213,7 @@ pub fn opt_str2(maybestr: Option<String>) -> String {
216213
}
217214

218215
pub fn run_tests(config: &Config) {
219-
if config.target == "arm-linux-androideabi" {
216+
if config.target.as_slice() == "arm-linux-androideabi" {
220217
match config.mode {
221218
DebugInfoGdb => {
222219
println!("arm-linux-androideabi debug-info \
@@ -309,13 +306,13 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
309306
let mut valid = false;
310307

311308
for ext in &valid_extensions {
312-
if name.ends_with(ext) {
309+
if name.ends_with(ext.as_slice()) {
313310
valid = true;
314311
}
315312
}
316313

317314
for pre in &invalid_prefixes {
318-
if name.starts_with(pre) {
315+
if name.starts_with(pre.as_slice()) {
319316
valid = false;
320317
}
321318
}
@@ -362,7 +359,7 @@ pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::Test
362359
let config = (*config).clone();
363360
// FIXME (#9639): This needs to handle non-utf8 paths
364361
let testfile = testfile.as_str().unwrap().to_string();
365-
test::DynMetricFn(box move |mm: &mut test::MetricMap| {
362+
test::DynMetricFn(box move |: mm: &mut test::MetricMap| {
366363
runtest::run_metrics(config, testfile, mm)
367364
})
368365
}

branches/auto/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
4444
rdr.lines().enumerate().filter_map(|(line_no, ln)| {
4545
parse_expected(last_nonfollow_error,
4646
line_no + 1,
47-
&ln.unwrap())
47+
ln.unwrap().as_slice())
4848
.map(|(which, error)| {
4949
match which {
5050
FollowPrevious(_) => {}

branches/auto/src/compiletest/header.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
145145

146146
pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
147147
fn ignore_target(config: &Config) -> String {
148-
format!("ignore-{}", util::get_os(&config.target))
148+
format!("ignore-{}", util::get_os(config.target.as_slice()))
149149
}
150150
fn ignore_stage(config: &Config) -> String {
151151
format!("ignore-{}",
@@ -169,8 +169,8 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
169169
.expect("Malformed GDB version directive");
170170
// Ignore if actual version is smaller the minimum required
171171
// version
172-
gdb_version_to_int(actual_version) <
173-
gdb_version_to_int(min_version)
172+
gdb_version_to_int(actual_version.as_slice()) <
173+
gdb_version_to_int(min_version.as_slice())
174174
} else {
175175
false
176176
}
@@ -197,8 +197,8 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
197197
.expect("Malformed lldb version directive");
198198
// Ignore if actual version is smaller the minimum required
199199
// version
200-
lldb_version_to_int(actual_version) <
201-
lldb_version_to_int(min_version)
200+
lldb_version_to_int(actual_version.as_slice()) <
201+
lldb_version_to_int(min_version.as_slice())
202202
} else {
203203
false
204204
}
@@ -209,8 +209,8 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
209209

210210
let val = iter_header(testfile, |ln| {
211211
!parse_name_directive(ln, "ignore-test") &&
212-
!parse_name_directive(ln, &ignore_target(config)) &&
213-
!parse_name_directive(ln, &ignore_stage(config)) &&
212+
!parse_name_directive(ln, ignore_target(config).as_slice()) &&
213+
!parse_name_directive(ln, ignore_stage(config).as_slice()) &&
214214
!(config.mode == common::Pretty && parse_name_directive(ln, "ignore-pretty")) &&
215215
!(config.target != config.host && parse_name_directive(ln, "ignore-cross-compile")) &&
216216
!ignore_gdb(config, ln) &&
@@ -294,7 +294,7 @@ fn parse_pretty_compare_only(line: &str) -> bool {
294294
fn parse_exec_env(line: &str) -> Option<(String, String)> {
295295
parse_name_value_directive(line, "exec-env").map(|nv| {
296296
// nv is either FOO or FOO=BAR
297-
let mut strs: Vec<String> = nv
297+
let mut strs: Vec<String> = nv.as_slice()
298298
.splitn(1, '=')
299299
.map(|s| s.to_string())
300300
.collect();
@@ -330,7 +330,7 @@ fn parse_name_directive(line: &str, directive: &str) -> bool {
330330
pub fn parse_name_value_directive(line: &str, directive: &str)
331331
-> Option<String> {
332332
let keycolon = format!("{}:", directive);
333-
match line.find_str(&keycolon) {
333+
match line.find_str(keycolon.as_slice()) {
334334
Some(colon) => {
335335
let value = line[(colon + keycolon.len()) .. line.len()].to_string();
336336
debug!("{}: {}", directive, value);
@@ -344,16 +344,16 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
344344
let error_string = format!(
345345
"Encountered GDB version string with unexpected format: {}",
346346
version_string);
347-
let error_string = error_string;
347+
let error_string = error_string.as_slice();
348348

349349
let components: Vec<&str> = version_string.trim().split('.').collect();
350350

351351
if components.len() != 2 {
352352
panic!("{}", error_string);
353353
}
354354

355-
let major: int = components[0].parse().ok().expect(&error_string);
356-
let minor: int = components[1].parse().ok().expect(&error_string);
355+
let major: int = components[0].parse().ok().expect(error_string);
356+
let minor: int = components[1].parse().ok().expect(error_string);
357357

358358
return major * 1000 + minor;
359359
}
@@ -362,7 +362,7 @@ pub fn lldb_version_to_int(version_string: &str) -> int {
362362
let error_string = format!(
363363
"Encountered LLDB version string with unexpected format: {}",
364364
version_string);
365-
let error_string = error_string;
366-
let major: int = version_string.parse().ok().expect(&error_string);
365+
let error_string = error_string.as_slice();
366+
let major: int = version_string.parse().ok().expect(error_string);
367367
return major;
368368
}

branches/auto/src/compiletest/procsrv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
2323

2424
// Add the new dylib search path var
2525
let var = DynamicLibrary::envvar();
26-
let newpath = DynamicLibrary::create_path(&path);
26+
let newpath = DynamicLibrary::create_path(path.as_slice());
2727
let newpath = String::from_utf8(newpath).unwrap();
2828
cmd.env(var.to_string(), newpath);
2929
}

0 commit comments

Comments
 (0)