use verbose flag as a default value for rust.verbose-tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
263a3aeeb8
commit
19b8f9e17c
2 changed files with 12 additions and 0 deletions
|
@ -1600,6 +1600,9 @@ impl Config {
|
||||||
|
|
||||||
config.verbose = cmp::max(config.verbose, flags.verbose as usize);
|
config.verbose = cmp::max(config.verbose, flags.verbose as usize);
|
||||||
|
|
||||||
|
// Verbose flag is a good default for `rust.verbose-tests`.
|
||||||
|
config.verbose_tests = config.is_verbose();
|
||||||
|
|
||||||
if let Some(install) = toml.install {
|
if let Some(install) = toml.install {
|
||||||
let Install { prefix, sysconfdir, docdir, bindir, libdir, mandir, datadir } = install;
|
let Install { prefix, sysconfdir, docdir, bindir, libdir, mandir, datadir } = install;
|
||||||
config.prefix = prefix.map(PathBuf::from);
|
config.prefix = prefix.map(PathBuf::from);
|
||||||
|
|
|
@ -317,3 +317,12 @@ fn order_of_clippy_rules() {
|
||||||
|
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn verbose_tests_default_value() {
|
||||||
|
let config = Config::parse(Flags::parse(&["build".into(), "compiler".into()]));
|
||||||
|
assert_eq!(config.verbose_tests, false);
|
||||||
|
|
||||||
|
let config = Config::parse(Flags::parse(&["build".into(), "compiler".into(), "-v".into()]));
|
||||||
|
assert_eq!(config.verbose_tests, true);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue