mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-09-11 05:35:53 +03:00
Activate test mode
This commit is contained in:
parent
7b7a08ff37
commit
828c64b440
@ -269,6 +269,10 @@ Print filename and status for each test
|
||||
|
||||
Print test metrics at the end of the run
|
||||
|
||||
### --test {#test}
|
||||
|
||||
Activate test mode; equals --output /dev/null --progress --summary
|
||||
|
||||
|
||||
### -x, --proxy [protocol://]host[:port] {#proxy}
|
||||
|
||||
|
@ -207,6 +207,11 @@ pub fn app() -> clap::App<'static, 'static> {
|
||||
.long("summary")
|
||||
.help("Print test metrics at the end of the run"),
|
||||
)
|
||||
.arg(
|
||||
clap::Arg::with_name("test")
|
||||
.long("test")
|
||||
.help("Activate test mode; equals --output /dev/null --progress --summary"),
|
||||
)
|
||||
.arg(
|
||||
clap::Arg::with_name("to_entry")
|
||||
.long("to-entry")
|
||||
@ -313,10 +318,16 @@ pub fn parse_options(matches: ArgMatches) -> Result<CliOptions, CliError> {
|
||||
},
|
||||
};
|
||||
let no_proxy = matches.value_of("proxy").map(|x| x.to_string());
|
||||
let output = matches.value_of("output").map(|x| x.to_string());
|
||||
let progress = matches.is_present("progress");
|
||||
let output = if let Some(filename) = matches.value_of("output") {
|
||||
Some(filename.to_string())
|
||||
} else if matches.is_present("test") {
|
||||
Some("/dev/null".to_string())
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let progress = matches.is_present("progress") || matches.is_present("test");
|
||||
let proxy = matches.value_of("proxy").map(|x| x.to_string());
|
||||
let summary = matches.is_present("summary");
|
||||
let summary = matches.is_present("summary") || matches.is_present("test");
|
||||
let timeout = match matches.value_of("max_time") {
|
||||
None => ClientOptions::default().timeout,
|
||||
Some(s) => match s.parse::<u64>() {
|
||||
|
Loading…
Reference in New Issue
Block a user