Skip to content

Commit

Permalink
Fix build_all_exclude
Browse files Browse the repository at this point in the history
by using with_stderr_contains because
parallel build may mix up the lines.

Additionally, remove the last line of
the benchmark.
  • Loading branch information
torkleyy committed May 27, 2017
1 parent b961de2 commit dee3c2e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 1 addition & 3 deletions tests/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1061,9 +1061,7 @@ fn bench_all_exclude() {
execs().with_status(0)
.with_stdout_contains("\
running 1 test
test bar ... bench: 0 ns/iter (+/- 0)
test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured"));
test bar ... bench: 0 ns/iter (+/- 0)"));
}

#[test]
Expand Down
6 changes: 3 additions & 3 deletions tests/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2841,9 +2841,9 @@ fn build_all_exclude() {
.arg("--exclude")
.arg("baz"),
execs().with_status(0)
.with_stderr("[..] Compiling bar v0.1.0 ([..])\n\
[..] Compiling foo v0.1.0 ([..])\n\
[..] Finished dev [unoptimized + debuginfo] target(s) in [..]\n"));
.with_stderr_contains("[..]Compiling foo v0.1.0 [..]")
.with_stderr_contains("[..]Compiling bar v0.1.0 [..]")
.with_stderr_does_not_contain("[..]Compiling baz v0.1.0 [..]"));
}

#[test]
Expand Down
4 changes: 1 addition & 3 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2418,9 +2418,7 @@ fn test_all_exclude() {
.arg("baz"),
execs().with_status(0)
.with_stdout_contains("running 1 test
test bar ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured"));
test bar ... ok"));
}

#[test]
Expand Down

0 comments on commit dee3c2e

Please sign in to comment.