mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 21:13:37 +00:00
fix: add extra_test_bin_args to test explorer test runner
trim whitespace
This commit is contained in:
parent
f4dbbac7ca
commit
18081eabd0
3 changed files with 8 additions and 0 deletions
|
@ -1884,6 +1884,7 @@ impl Config {
|
|||
CargoFeaturesDef::Selected(it) => it,
|
||||
},
|
||||
extra_args: self.extra_args().clone(),
|
||||
extra_test_bin_args: self.runnables_extraTestBinaryArgs().clone(),
|
||||
extra_env: self.extra_env().clone(),
|
||||
target_dir: self.target_dir_from_config(),
|
||||
}
|
||||
|
@ -1934,6 +1935,7 @@ impl Config {
|
|||
CargoFeaturesDef::Selected(it) => it,
|
||||
},
|
||||
extra_args: self.check_extra_args(),
|
||||
extra_test_bin_args: self.runnables_extraTestBinaryArgs().clone(),
|
||||
extra_env: self.check_extra_env(),
|
||||
target_dir: self.target_dir_from_config(),
|
||||
},
|
||||
|
|
|
@ -30,6 +30,7 @@ pub(crate) struct CargoOptions {
|
|||
pub(crate) all_features: bool,
|
||||
pub(crate) features: Vec<String>,
|
||||
pub(crate) extra_args: Vec<String>,
|
||||
pub(crate) extra_test_bin_args: Vec<String>,
|
||||
pub(crate) extra_env: FxHashMap<String, String>,
|
||||
pub(crate) target_dir: Option<Utf8PathBuf>,
|
||||
}
|
||||
|
|
|
@ -102,6 +102,11 @@ impl CargoTestHandle {
|
|||
}
|
||||
cmd.args(["-Z", "unstable-options"]);
|
||||
cmd.arg("--format=json");
|
||||
|
||||
for extra_arg in options.extra_test_bin_args {
|
||||
cmd.arg(extra_arg);
|
||||
}
|
||||
|
||||
Ok(Self { _handle: CommandHandle::spawn(cmd, sender)? })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue