Skip to content

Commit 155e4cd

Browse files
committed
---
yaml --- r: 148935 b: refs/heads/try2 c: c09ca94 h: refs/heads/master i: 148933: 51e7a66 148931: 881b59d 148927: a421b16 v: v3
1 parent f99041d commit 155e4cd

File tree

9 files changed

+464
-506
lines changed

9 files changed

+464
-506
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: 9752c63035bc78f624c5fa1ca644f15db4e2a0df
8+
refs/heads/try2: c09ca940e540e2ef77a9b4bf1f9807276b300f3d
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/compiletest/compiletest.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use std::os;
2020
use std::io;
2121
use std::io::fs;
2222

23-
use getopts::groups::{optopt, optflag, reqopt};
23+
use getopts::{optopt, optflag, reqopt};
2424
use extra::test;
2525

2626
use common::config;
@@ -49,7 +49,7 @@ pub fn main() {
4949

5050
pub fn parse_config(args: ~[~str]) -> config {
5151

52-
let groups : ~[getopts::groups::OptGroup] =
52+
let groups : ~[getopts::OptGroup] =
5353
~[reqopt("", "compile-lib-path", "path to host shared libraries", "PATH"),
5454
reqopt("", "run-lib-path", "path to target shared libraries", "PATH"),
5555
reqopt("", "rustc-path", "path to rustc to use for compiling", "PATH"),
@@ -85,20 +85,20 @@ pub fn parse_config(args: ~[~str]) -> config {
8585
let args_ = args.tail();
8686
if args[1] == ~"-h" || args[1] == ~"--help" {
8787
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
88-
println!("{}", getopts::groups::usage(message, groups));
88+
println!("{}", getopts::usage(message, groups));
8989
println!("");
9090
fail!()
9191
}
9292

9393
let matches =
94-
&match getopts::groups::getopts(args_, groups) {
94+
&match getopts::getopts(args_, groups) {
9595
Ok(m) => m,
9696
Err(f) => fail!("{}", f.to_err_msg())
9797
};
9898

9999
if matches.opt_present("h") || matches.opt_present("help") {
100100
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
101-
println!("{}", getopts::groups::usage(message, groups));
101+
println!("{}", getopts::usage(message, groups));
102102
println!("");
103103
fail!()
104104
}

branches/try2/src/libextra/test.rs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
extern mod term;
1919

20-
use getopts::groups;
2120
use getopts;
2221
use json::ToJson;
2322
use json;
@@ -209,29 +208,29 @@ pub struct TestOpts {
209208
/// Result of parsing the options.
210209
pub type OptRes = Result<TestOpts, ~str>;
211210

212-
fn optgroups() -> ~[getopts::groups::OptGroup] {
213-
~[groups::optflag("", "ignored", "Run ignored tests"),
214-
groups::optflag("", "test", "Run tests and not benchmarks"),
215-
groups::optflag("", "bench", "Run benchmarks instead of tests"),
216-
groups::optflag("h", "help", "Display this message (longer with --help)"),
217-
groups::optopt("", "save-metrics", "Location to save bench metrics",
211+
fn optgroups() -> ~[getopts::OptGroup] {
212+
~[getopts::optflag("", "ignored", "Run ignored tests"),
213+
getopts::optflag("", "test", "Run tests and not benchmarks"),
214+
getopts::optflag("", "bench", "Run benchmarks instead of tests"),
215+
getopts::optflag("h", "help", "Display this message (longer with --help)"),
216+
getopts::optopt("", "save-metrics", "Location to save bench metrics",
218217
"PATH"),
219-
groups::optopt("", "ratchet-metrics",
218+
getopts::optopt("", "ratchet-metrics",
220219
"Location to load and save metrics from. The metrics \
221220
loaded are cause benchmarks to fail if they run too \
222221
slowly", "PATH"),
223-
groups::optopt("", "ratchet-noise-percent",
222+
getopts::optopt("", "ratchet-noise-percent",
224223
"Tests within N% of the recorded metrics will be \
225224
considered as passing", "PERCENTAGE"),
226-
groups::optopt("", "logfile", "Write logs to the specified file instead \
225+
getopts::optopt("", "logfile", "Write logs to the specified file instead \
227226
of stdout", "PATH"),
228-
groups::optopt("", "test-shard", "run shard A, of B shards, worth of the testsuite",
227+
getopts::optopt("", "test-shard", "run shard A, of B shards, worth of the testsuite",
229228
"A.B")]
230229
}
231230

232231
fn usage(binary: &str, helpstr: &str) {
233232
let message = format!("Usage: {} [OPTIONS] [FILTER]", binary);
234-
println!("{}", groups::usage(message, optgroups()));
233+
println!("{}", getopts::usage(message, optgroups()));
235234
println!("");
236235
if helpstr == "help" {
237236
println!("{}", "\
@@ -261,7 +260,7 @@ Test Attributes:
261260
pub fn parse_opts(args: &[~str]) -> Option<OptRes> {
262261
let args_ = args.tail();
263262
let matches =
264-
match groups::getopts(args_, optgroups()) {
263+
match getopts::getopts(args_, optgroups()) {
265264
Ok(m) => m,
266265
Err(f) => return Some(Err(f.to_err_msg()))
267266
};

0 commit comments

Comments
 (0)