Skip to content

Commit a0220e8

Browse files
committed
---
yaml --- r: 144543 b: refs/heads/try2 c: 8a07f57 h: refs/heads/master i: 144541: 08559da 144539: a658d28 144535: b3dc999 144527: 7d17a8f 144511: 02b73a2 v: v3
1 parent d9ae793 commit a0220e8

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 14cdc26e8a7794e437946f46df5769362b42acdf
8+
refs/heads/try2: 8a07f5708196dd72ec030018c2a215a4dd823b2e
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/compiletest/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub struct config {
3636
llvm_bin_path: Option<Path>,
3737

3838
// The directory containing the tests to run
39-
src_base: Path,
39+
src_base: ~[Path],
4040

4141
// The directory where programs should be built
4242
build_base: Path,

branches/try2/src/compiletest/compiletest.rs

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::os;
1919
use std::f64;
2020

2121
use extra::getopts;
22-
use extra::getopts::groups::{optopt, optflag, reqopt};
22+
use extra::getopts::groups::{optopt, optflag, reqopt, optmulti};
2323
use extra::test;
2424

2525
use common::config;
@@ -49,19 +49,19 @@ pub fn main() {
4949
pub fn parse_config(args: ~[~str]) -> config {
5050

5151
let groups : ~[getopts::groups::OptGroup] =
52-
~[reqopt("", "compile-lib-path", "path to host shared libraries", "PATH"),
53-
reqopt("", "run-lib-path", "path to target shared libraries", "PATH"),
54-
reqopt("", "rustc-path", "path to rustc to use for compiling", "PATH"),
55-
optopt("", "clang-path", "path to executable for codegen tests", "PATH"),
56-
optopt("", "llvm-bin-path", "path to directory holding llvm binaries", "DIR"),
57-
reqopt("", "src-base", "directory to scan for test files", "PATH"),
58-
reqopt("", "build-base", "directory to deposit test outputs", "PATH"),
59-
reqopt("", "aux-base", "directory to find auxiliary test files", "PATH"),
60-
reqopt("", "stage-id", "the target-stage identifier", "stageN-TARGET"),
61-
reqopt("", "mode", "which sort of compile tests to run",
62-
"(compile-fail|run-fail|run-pass|pretty|debug-info)"),
63-
optflag("", "ignored", "run tests marked as ignored / xfailed"),
64-
optopt("", "runtool", "supervisor program to run tests under \
52+
~[reqopt ("", "compile-lib-path", "path to host shared libraries", "PATH"),
53+
reqopt ("", "run-lib-path", "path to target shared libraries", "PATH"),
54+
reqopt ("", "rustc-path", "path to rustc to use for compiling", "PATH"),
55+
optopt ("", "clang-path", "path to executable for codegen tests", "PATH"),
56+
optopt ("", "llvm-bin-path", "path to directory holding llvm binaries", "DIR"),
57+
optmulti ("", "src-base", "directory to scan for test files", "PATH"),
58+
reqopt ("", "build-base", "directory to deposit test outputs", "PATH"),
59+
reqopt ("", "aux-base", "directory to find auxiliary test files", "PATH"),
60+
reqopt ("", "stage-id", "the target-stage identifier", "stageN-TARGET"),
61+
reqopt ("", "mode", "which sort of compile tests to run",
62+
" (compile-fail|run-fail|run-pass|pretty|debug-info)"),
63+
optflag ("", "ignored", "run tests marked as ignored / xfailed"),
64+
optopt ("", "runtool", "supervisor program to run tests under \
6565
(eg. emulator, valgrind)", "PROGRAM"),
6666
optopt("", "rustcflags", "flags to pass to rustc", "FLAGS"),
6767
optflag("", "verbose", "run tests verbosely, showing all output"),
@@ -105,14 +105,16 @@ pub fn parse_config(args: ~[~str]) -> config {
105105
fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
106106
Path(getopts::opt_str(m, nm))
107107
}
108+
109+
let src_base = getopts::opt_strs(matches, "src-base");
108110

109111
config {
110112
compile_lib_path: getopts::opt_str(matches, "compile-lib-path"),
111113
run_lib_path: getopts::opt_str(matches, "run-lib-path"),
112114
rustc_path: opt_path(matches, "rustc-path"),
113115
clang_path: getopts::opt_maybe_str(matches, "clang-path").map_move(|s| Path(s)),
114116
llvm_bin_path: getopts::opt_maybe_str(matches, "llvm-bin-path").map_move(|s| Path(s)),
115-
src_base: opt_path(matches, "src-base"),
117+
src_base: src_base.iter().map(|x| Path(x.clone())).collect(),
116118
build_base: opt_path(matches, "build-base"),
117119
aux_base: opt_path(matches, "aux-base"),
118120
stage_id: getopts::opt_str(matches, "stage-id"),
@@ -248,7 +250,7 @@ pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
248250
debug!("making tests from %s",
249251
config.src_base.to_str());
250252
let mut tests = ~[];
251-
let dirs = os::list_dir_path(&config.src_base);
253+
let dirs = config.src_base.iter().flat_map(|x| os::list_dir_path(x).move_iter()).to_owned_vec();
252254
for file in dirs.iter() {
253255
let file = file.clone();
254256
debug!("inspecting file %s", file.to_str());

0 commit comments

Comments
 (0)