Skip to content

Commit ee4fe04

Browse files
committed
---
yaml --- r: 275239 b: refs/heads/stable c: 52ed15f h: refs/heads/master i: 275237: ac04d72 275235: ac5f7fb 275231: 8d0dffa
1 parent 079467f commit ee4fe04

File tree

212 files changed

+420
-908
lines changed

Some content is hidden

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

212 files changed

+420
-908
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 903798dce039efb54d46c4d4ee1770e3ef192d89
32+
refs/heads/stable: 52ed15fb7c7f3771a8a277c616a75f6ba26f050e
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/Makefile.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@
100100
# // Having trouble figuring out which test is failing? Turn off parallel tests
101101
# make check-stage1-std RUST_TEST_THREADS=1
102102
#
103-
# // To make debug!() and other logging calls visible, reconfigure:
104-
# ./configure --enable-debug-assertions
105-
# make ....
106-
#
107103
# If you really feel like getting your hands dirty, then:
108104
#
109105
# run `make nitty-gritty`

branches/stable/mk/cfg/arm-unknown-linux-gnueabi.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ CFG_LIB_NAME_arm-unknown-linux-gnueabi=lib$(1).so
88
CFG_STATIC_LIB_NAME_arm-unknown-linux-gnueabi=lib$(1).a
99
CFG_LIB_GLOB_arm-unknown-linux-gnueabi=lib$(1)-*.so
1010
CFG_LIB_DSYM_GLOB_arm-unknown-linux-gnueabi=lib$(1)-*.dylib.dSYM
11-
CFG_JEMALLOC_CFLAGS_arm-unknown-linux-gnueabi := -D__arm__ -mfloat-abi=soft $(CFLAGS) -march=armv6 -marm
12-
CFG_GCCISH_CFLAGS_arm-unknown-linux-gnueabi := -Wall -g -fPIC -D__arm__ -mfloat-abi=soft $(CFLAGS) -march=armv6 -marm
11+
CFG_JEMALLOC_CFLAGS_arm-unknown-linux-gnueabi := -D__arm__ -mfloat-abi=soft $(CFLAGS)
12+
CFG_GCCISH_CFLAGS_arm-unknown-linux-gnueabi := -Wall -g -fPIC -D__arm__ -mfloat-abi=soft $(CFLAGS)
1313
CFG_GCCISH_CXXFLAGS_arm-unknown-linux-gnueabi := -fno-rtti $(CXXFLAGS)
1414
CFG_GCCISH_LINK_FLAGS_arm-unknown-linux-gnueabi := -shared -fPIC -g
1515
CFG_GCCISH_DEF_FLAG_arm-unknown-linux-gnueabi := -Wl,--export-dynamic,--dynamic-list=

branches/stable/mk/cfg/arm-unknown-linux-gnueabihf.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ CFG_LIB_NAME_arm-unknown-linux-gnueabihf=lib$(1).so
88
CFG_STATIC_LIB_NAME_arm-unknown-linux-gnueabihf=lib$(1).a
99
CFG_LIB_GLOB_arm-unknown-linux-gnueabihf=lib$(1)-*.so
1010
CFG_LIB_DSYM_GLOB_arm-unknown-linux-gnueabihf=lib$(1)-*.dylib.dSYM
11-
CFG_JEMALLOC_CFLAGS_arm-unknown-linux-gnueabihf := -D__arm__ $(CFLAGS) -march=armv6 -marm
12-
CFG_GCCISH_CFLAGS_arm-unknown-linux-gnueabihf := -Wall -g -fPIC -D__arm__ $(CFLAGS) -march=armv6 -marm
11+
CFG_JEMALLOC_CFLAGS_arm-unknown-linux-gnueabihf := -D__arm__ $(CFLAGS)
12+
CFG_GCCISH_CFLAGS_arm-unknown-linux-gnueabihf := -Wall -g -fPIC -D__arm__ $(CFLAGS)
1313
CFG_GCCISH_CXXFLAGS_arm-unknown-linux-gnueabihf := -fno-rtti $(CXXFLAGS)
1414
CFG_GCCISH_LINK_FLAGS_arm-unknown-linux-gnueabihf := -shared -fPIC -g
1515
CFG_GCCISH_DEF_FLAG_arm-unknown-linux-gnueabihf := -Wl,--export-dynamic,--dynamic-list=

branches/stable/mk/tests.mk

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -458,22 +458,21 @@ $(foreach host,$(CFG_HOST), \
458458
# Rules for the compiletest tests (rpass, rfail, etc.)
459459
######################################################################
460460

461-
RPASS_RS := $(call rwildcard,$(S)src/test/run-pass/,*.rs)
462-
RPASS_VALGRIND_RS := $(call rwildcard,$(S)src/test/run-pass-valgrind/,*.rs)
463-
RPASS_FULL_RS := $(call rwildcard,$(S)src/test/run-pass-fulldeps/,*.rs)
464-
RFAIL_FULL_RS := $(call rwildcard,$(S)src/test/run-fail-fulldeps/,*.rs)
465-
CFAIL_FULL_RS := $(call rwildcard,$(S)src/test/compile-fail-fulldeps/,*.rs)
466-
RFAIL_RS := $(call rwildcard,$(S)src/test/run-fail/,*.rs)
467-
RFAIL_RS := $(call rwildcard,$(S)src/test/run-fail/,*.rs)
468-
CFAIL_RS := $(call rwildcard,$(S)src/test/compile-fail/,*.rs)
469-
PFAIL_RS := $(call rwildcard,$(S)src/test/parse-fail/,*.rs)
470-
PRETTY_RS := $(call rwildcard,$(S)src/test/pretty/,*.rs)
471-
DEBUGINFO_GDB_RS := $(call rwildcard,$(S)src/test/debuginfo/,*.rs)
472-
DEBUGINFO_LLDB_RS := $(call rwildcard,$(S)src/test/debuginfo/,*.rs)
473-
CODEGEN_RS := $(call rwildcard,$(S)src/test/codegen/,*.rs)
474-
CODEGEN_CC := $(call rwildcard,$(S)src/test/codegen/,*.cc)
475-
CODEGEN_UNITS_RS := $(call rwildcard,$(S)src/test/codegen-units/,*.rs)
476-
RUSTDOCCK_RS := $(call rwildcard,$(S)src/test/rustdoc/,*.rs)
461+
RPASS_RS := $(wildcard $(S)src/test/run-pass/*.rs)
462+
RPASS_VALGRIND_RS := $(wildcard $(S)src/test/run-pass-valgrind/*.rs)
463+
RPASS_FULL_RS := $(wildcard $(S)src/test/run-pass-fulldeps/*.rs)
464+
RFAIL_FULL_RS := $(wildcard $(S)src/test/run-fail-fulldeps/*.rs)
465+
CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs)
466+
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
467+
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
468+
PFAIL_RS := $(wildcard $(S)src/test/parse-fail/*.rs)
469+
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
470+
DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
471+
DEBUGINFO_LLDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
472+
CODEGEN_RS := $(wildcard $(S)src/test/codegen/*.rs)
473+
CODEGEN_CC := $(wildcard $(S)src/test/codegen/*.cc)
474+
CODEGEN_UNITS_RS := $(wildcard $(S)src/test/codegen-units/*.rs)
475+
RUSTDOCCK_RS := $(wildcard $(S)src/test/rustdoc/*.rs)
477476

478477
RPASS_TESTS := $(RPASS_RS)
479478
RPASS_VALGRIND_TESTS := $(RPASS_VALGRIND_RS)

branches/stable/src/compiletest/compiletest.rs

Lines changed: 26 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ extern crate log;
2828

2929
use std::env;
3030
use std::fs;
31-
use std::io;
3231
use std::path::{Path, PathBuf};
3332
use getopts::{optopt, optflag, reqopt};
3433
use common::Config;
3534
use common::{Pretty, DebugInfoGdb, DebugInfoLldb};
36-
use test::TestPaths;
3735
use util::logv;
3836

3937
pub mod procsrv;
@@ -269,61 +267,15 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
269267
debug!("making tests from {:?}",
270268
config.src_base.display());
271269
let mut tests = Vec::new();
272-
collect_tests_from_dir(config,
273-
&config.src_base,
274-
&config.src_base,
275-
&PathBuf::new(),
276-
&mut tests)
277-
.unwrap();
278-
tests
279-
}
280-
281-
fn collect_tests_from_dir(config: &Config,
282-
base: &Path,
283-
dir: &Path,
284-
relative_dir_path: &Path,
285-
tests: &mut Vec<test::TestDescAndFn>)
286-
-> io::Result<()> {
287-
// Ignore directories that contain a file
288-
// `compiletest-ignore-dir`.
289-
for file in try!(fs::read_dir(dir)) {
290-
let file = try!(file);
291-
if file.file_name() == *"compiletest-ignore-dir" {
292-
return Ok(());
293-
}
294-
}
295-
296-
let dirs = try!(fs::read_dir(dir));
270+
let dirs = fs::read_dir(&config.src_base).unwrap();
297271
for file in dirs {
298-
let file = try!(file);
299-
let file_path = file.path();
300-
debug!("inspecting file {:?}", file_path.display());
301-
if is_test(config, &file_path) {
302-
// If we find a test foo/bar.rs, we have to build the
303-
// output directory `$build/foo` so we can write
304-
// `$build/foo/bar` into it. We do this *now* in this
305-
// sequential loop because otherwise, if we do it in the
306-
// tests themselves, they race for the privilege of
307-
// creating the directories and sometimes fail randomly.
308-
let build_dir = config.build_base.join(&relative_dir_path);
309-
fs::create_dir_all(&build_dir).unwrap();
310-
311-
let paths = TestPaths {
312-
file: file_path,
313-
base: base.to_path_buf(),
314-
relative_dir: relative_dir_path.to_path_buf(),
315-
};
316-
tests.push(make_test(config, &paths))
317-
} else if file_path.is_dir() {
318-
let relative_file_path = relative_dir_path.join(file.file_name());
319-
try!(collect_tests_from_dir(config,
320-
base,
321-
&file_path,
322-
&relative_file_path,
323-
tests));
272+
let file = file.unwrap().path();
273+
debug!("inspecting file {:?}", file.display());
274+
if is_test(config, &file) {
275+
tests.push(make_test(config, &file))
324276
}
325277
}
326-
Ok(())
278+
tests
327279
}
328280

329281
pub fn is_test(config: &Config, testfile: &Path) -> bool {
@@ -353,33 +305,36 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
353305
return valid;
354306
}
355307

356-
pub fn make_test(config: &Config, testpaths: &TestPaths) -> test::TestDescAndFn {
308+
pub fn make_test(config: &Config, testfile: &Path) -> test::TestDescAndFn
309+
{
357310
test::TestDescAndFn {
358311
desc: test::TestDesc {
359-
name: make_test_name(config, testpaths),
360-
ignore: header::is_test_ignored(config, &testpaths.file),
312+
name: make_test_name(config, testfile),
313+
ignore: header::is_test_ignored(config, testfile),
361314
should_panic: test::ShouldPanic::No,
362315
},
363-
testfn: make_test_closure(config, testpaths),
316+
testfn: make_test_closure(config, &testfile),
364317
}
365318
}
366319

367-
pub fn make_test_name(config: &Config, testpaths: &TestPaths) -> test::TestName {
368-
// Convert a complete path to something like
369-
//
370-
// run-pass/foo/bar/baz.rs
371-
let path =
372-
PathBuf::from(config.mode.to_string())
373-
.join(&testpaths.relative_dir)
374-
.join(&testpaths.file.file_name().unwrap());
375-
test::DynTestName(format!("[{}] {}", config.mode, path.display()))
320+
pub fn make_test_name(config: &Config, testfile: &Path) -> test::TestName {
321+
322+
// Try to elide redundant long paths
323+
fn shorten(path: &Path) -> String {
324+
let filename = path.file_name().unwrap().to_str();
325+
let p = path.parent().unwrap();
326+
let dir = p.file_name().unwrap().to_str();
327+
format!("{}/{}", dir.unwrap_or(""), filename.unwrap_or(""))
328+
}
329+
330+
test::DynTestName(format!("[{}] {}", config.mode, shorten(testfile)))
376331
}
377332

378-
pub fn make_test_closure(config: &Config, testpaths: &TestPaths) -> test::TestFn {
379-
let config = config.clone();
380-
let testpaths = testpaths.clone();
333+
pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
334+
let config = (*config).clone();
335+
let testfile = testfile.to_path_buf();
381336
test::DynTestFn(Box::new(move || {
382-
runtest::run(config, &testpaths)
337+
runtest::run(config, &testfile)
383338
}))
384339
}
385340

0 commit comments

Comments
 (0)