Skip to content

Commit 41c3dc5

Browse files
committed
Make cargotest run cargo test --all instead of cargo test,
… to support Cargo workspaces.
1 parent 90dddf4 commit 41c3dc5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/tools/cargotest/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ fn clone_repo(test: &Test, out_dir: &Path) -> PathBuf {
143143
fn run_cargo_test(cargo_path: &Path, crate_path: &Path, packages: &[&str]) -> bool {
144144
let mut command = Command::new(cargo_path);
145145
command.arg("test");
146+
if packages.is_empty() {
147+
command.arg("--all");
148+
}
146149
for name in packages {
147150
command.arg("-p").arg(name);
148151
}

0 commit comments

Comments
 (0)