Skip to content

Commit 66275ef

Browse files
committed
Speed up dependency builds by allowing parallelism
1 parent 708070f commit 66275ef

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/dependencies.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,14 @@ impl Default for DependencyBuilder {
385385
fn default() -> Self {
386386
Self {
387387
crate_manifest_path: PathBuf::from("Cargo.toml"),
388-
program: CommandBuilder::cargo(),
388+
program: CommandBuilder {
389+
// We don't need any of the other flags that are useful by default
390+
// for running cargo in ui_tests. The dependency builder output
391+
// is never recorded into .stderr files, so colors, ordering
392+
// and verbosity is not important.
393+
args: vec!["build".into()],
394+
..CommandBuilder::cargo()
395+
},
389396
build_std: None,
390397
bless_lockfile: false,
391398
}

tests/integrations/dep-fail/Cargo.stdout

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ Building dependencies ... FAILED
77
tests/ui/basic_test.rs ... FAILED
88

99
FAILED TEST: tests/ui/basic_test.rs
10-
command: "$CMD" "build" "--color=never" "--quiet" "--jobs" "1" "--target-dir" "$DIR/tests/integrations/dep-fail/target/ui/0" "--manifest-path" "tested_crate/Cargo.toml" "--message-format=json"
10+
command: "$CMD" "build" "--target-dir" "$DIR/tests/integrations/dep-fail/target/ui/0" "--manifest-path" "tested_crate/Cargo.toml" "--message-format=json"
1111

1212
full stderr:
13+
Compiling tested_crate v0.1.0-dev ($DIR/tests/integrations/dep-fail/tested_crate)
1314
error: could not compile `tested_crate` (lib) due to 1 previous error
1415

1516
full stdout:

tests/integrations/dep-fail/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#@normalize-stdout-test: " *Blocking waiting for file lock on package cache\n" -> ""
2+
13
[package]
24
name = "compile_test"
35
version = "0.1.0"

0 commit comments

Comments
 (0)