X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibtest%2Fcli.rs;h=edff8bea0f3d0b036896cb70e829e00495f262bd;hb=3d8778d767f0dde6fe2bc9459f21ead8e124d8cb;hp=c97cb0e0605a220ba4afb255356de3f45493fb21;hpb=96ad8e5fbcf00afc1ccde386b031919b4d01aa33;p=rust.git
diff --git a/src/libtest/cli.rs b/src/libtest/cli.rs
index c97cb0e0605..edff8bea0f3 100644
--- a/src/libtest/cli.rs
+++ b/src/libtest/cli.rs
@@ -1,12 +1,12 @@
//! Module converting command-line arguments into test configuration.
+use getopts;
use std::env;
use std::path::PathBuf;
-use getopts;
-use super::options::{RunIgnored, ColorConfig, OutputFormat, Options};
-use super::time::TestTimeOptions;
use super::helpers::isatty;
+use super::options::{ColorConfig, Options, OutputFormat, RunIgnored};
+use super::time::TestTimeOptions;
#[derive(Debug)]
pub struct TestOpts {
@@ -86,11 +86,7 @@ fn optgroups() -> getopts::Options {
"Display one character per test instead of one line. \
Alias to --format=terse",
)
- .optflag(
- "",
- "exact",
- "Exactly match filters rather than by substring",
- )
+ .optflag("", "exact", "Exactly match filters rather than by substring")
.optopt(
"",
"color",
@@ -109,11 +105,7 @@ fn optgroups() -> getopts::Options {
json = Output a json document",
"pretty|terse|json",
)
- .optflag(
- "",
- "show-output",
- "Show captured stdout of successful tests"
- )
+ .optflag("", "show-output", "Show captured stdout of successful tests")
.optopt(
"Z",
"",
@@ -133,9 +125,11 @@ fn optgroups() -> getopts::Options {
`RUST_TEST_TIME_DOCTEST` environment variables.
Expected format of environment variable is `VARIABLE=WARN_TIME,CRITICAL_TIME`.
+ Durations must be specified in milliseconds, e.g. `500,2000` means that the warn time
+ is 0.5 seconds, and the critical time is 2 seconds.
Not available for --format=terse",
- "plain|colored"
+ "plain|colored",
)
.optflag(
"",
@@ -149,7 +143,7 @@ fn optgroups() -> getopts::Options {
Expected format of environment variable is `VARIABLE=WARN_TIME,CRITICAL_TIME`.
`CRITICAL_TIME` here means the limit that should not be exceeded by test.
- "
+ ",
);
opts
}
@@ -293,8 +287,8 @@ fn is_nightly() -> bool {
// Gets the CLI options assotiated with `report-time` feature.
fn get_time_options(
matches: &getopts::Matches,
- allow_unstable: bool)
--> OptPartRes