From eb4383fce9e539bd72eb711bd825d542afb20cec Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Fri, 14 Jul 2023 11:28:49 -0700 Subject: [PATCH] fix(vdev): Add `--features` with default features for vdev test (#17977) Whenever `features` are not provided. Matches `make test` behavior. Fixes: #17975 Signed-off-by: Jesse Szwedko Signed-off-by: Jesse Szwedko --- vdev/src/commands/test.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vdev/src/commands/test.rs b/vdev/src/commands/test.rs index 659a2bbc6010b..4c9f39d60e01a 100644 --- a/vdev/src/commands/test.rs +++ b/vdev/src/commands/test.rs @@ -38,13 +38,14 @@ impl Cli { let runner = get_agent_test_runner(self.container)?; let mut args = vec!["--workspace".to_string()]; - if let Some(extra_args) = &self.args { - args.extend(extra_args.clone()); - if !(self.container || extra_args.contains(&"--features".to_string())) { - let features = platform::default_features(); - args.extend(["--features".to_string(), features.to_string()]); - } + if let Some(mut extra_args) = self.args { + args.append(&mut extra_args); + } + + if !args.contains(&"--features".to_string()) { + let features = platform::default_features(); + args.extend(["--features".to_string(), features.to_string()]); } runner.test(