Skip to content

Commit

Permalink
Remove unsupported test features from compiletest.
Browse files Browse the repository at this point in the history
Removes test-shard, ratchet-metrics and save-metrics from Config in
compiletest/common.rs.
  • Loading branch information
ahmedcharles committed Jan 20, 2015
1 parent d7b30f9 commit ec41785
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 34 deletions.
14 changes: 0 additions & 14 deletions src/compiletest/common.rs
Expand Up @@ -115,20 +115,6 @@ pub struct Config {
// Write out a parseable log of tests that were run
pub logfile: Option<Path>,

// Write out a json file containing any metrics of the run
pub save_metrics: Option<Path>,

// Write and ratchet a metrics file
pub ratchet_metrics: Option<Path>,

// Percent change in metrics to consider noise
pub ratchet_noise_percent: Option<f64>,

// "Shard" of the testsuite to pub run: this has the form of
// two numbers (a,b), and causes only those tests with
// positional order equal to a mod b to run.
pub test_shard: Option<(uint,uint)>,

// A command line to prefix program execution with,
// for running under valgrind
pub runtool: Option<String>,
Expand Down
24 changes: 4 additions & 20 deletions src/compiletest/compiletest.rs
Expand Up @@ -77,10 +77,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
optopt("", "target-rustcflags", "flags to pass to rustc for target", "FLAGS"),
optflag("", "verbose", "run tests verbosely, showing all output"),
optopt("", "logfile", "file to log test execution to", "FILE"),
optopt("", "save-metrics", "file to save metrics to", "FILE"),
optopt("", "ratchet-metrics", "file to ratchet metrics against", "FILE"),
optopt("", "ratchet-noise-percent",
"percent change in metrics to consider noise", "N"),
optflag("", "jit", "run tests under the JIT"),
optopt("", "target", "the target to build for", "TARGET"),
optopt("", "host", "the host to build for", "HOST"),
Expand All @@ -90,7 +86,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
optopt("", "adb-path", "path to the android debugger", "PATH"),
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
optopt("", "lldb-python-dir", "directory containing LLDB's python module", "PATH"),
optopt("", "test-shard", "run shard A, of B shards, worth of the testsuite", "A.B"),
optflag("h", "help", "show this message"));

assert!(!args.is_empty());
Expand Down Expand Up @@ -152,12 +147,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
filter: filter,
cfail_regex: Regex::new(errors::EXPECTED_PATTERN).unwrap(),
logfile: matches.opt_str("logfile").map(|s| Path::new(s)),
save_metrics: matches.opt_str("save-metrics").map(|s| Path::new(s)),
ratchet_metrics:
matches.opt_str("ratchet-metrics").map(|s| Path::new(s)),
ratchet_noise_percent:
matches.opt_str("ratchet-noise-percent")
.and_then(|s| s.as_slice().parse::<f64>()),
runtool: matches.opt_str("runtool"),
host_rustcflags: matches.opt_str("host-rustcflags"),
target_rustcflags: matches.opt_str("target-rustcflags"),
Expand All @@ -176,7 +165,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
opt_str2(matches.opt_str("adb-test-dir")).as_slice() &&
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
lldb_python_dir: matches.opt_str("lldb-python-dir"),
test_shard: test::opt_shard(matches.opt_str("test-shard")),
verbose: matches.opt_present("verbose"),
}
}
Expand Down Expand Up @@ -210,10 +198,6 @@ pub fn log_config(config: &Config) {
logv(c, format!("adb_test_dir: {:?}", config.adb_test_dir));
logv(c, format!("adb_device_status: {}",
config.adb_device_status));
match config.test_shard {
None => logv(c, "test_shard: (all)".to_string()),
Some((a,b)) => logv(c, format!("test_shard: {}.{}", a, b))
}
logv(c, format!("verbose: {}", config.verbose));
logv(c, format!("\n"));
}
Expand Down Expand Up @@ -284,10 +268,10 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
logfile: config.logfile.clone(),
run_tests: true,
run_benchmarks: true,
ratchet_metrics: config.ratchet_metrics.clone(),
ratchet_noise_percent: config.ratchet_noise_percent.clone(),
save_metrics: config.save_metrics.clone(),
test_shard: config.test_shard.clone(),
ratchet_metrics: None,
ratchet_noise_percent: None,
save_metrics: None,
test_shard: None,
nocapture: false,
color: test::AutoColor,
show_boxplot: false,
Expand Down

0 comments on commit ec41785

Please sign in to comment.