Skip to content

Commit

Permalink
fix test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
guswynn committed Feb 21, 2021
1 parent 70d54be commit 04c8372
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 118 deletions.
72 changes: 36 additions & 36 deletions tests/testsuite/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn cargo_bench_simple() {
"\
[COMPILING] foo v0.5.0 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]",
[RUNNING] [..] (target/release/deps/foo-[..][EXE])",
)
.with_stdout_contains("test bench_hello ... bench: [..]")
.run();
Expand Down Expand Up @@ -91,8 +91,8 @@ fn bench_bench_implicit() {
"\
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]
[RUNNING] target/release/deps/mybench-[..][EXE]
[RUNNING] [..] (target/release/deps/foo-[..][EXE])
[RUNNING] [..] (target/release/deps/mybench-[..][EXE])
",
)
.with_stdout_contains("test run2 ... bench: [..]")
Expand Down Expand Up @@ -139,7 +139,7 @@ fn bench_bin_implicit() {
"\
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]
[RUNNING] [..] (target/release/deps/foo-[..][EXE])
",
)
.with_stdout_contains("test run1 ... bench: [..]")
Expand Down Expand Up @@ -176,7 +176,7 @@ fn bench_tarname() {
"\
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/bin2-[..][EXE]
[RUNNING] [..] (target/release/deps/bin2-[..][EXE])
",
)
.with_stdout_contains("test run2 ... bench: [..]")
Expand Down Expand Up @@ -344,7 +344,7 @@ fn cargo_bench_failing_test() {
"\
[COMPILING] foo v0.5.0 ([CWD])[..]
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]",
[RUNNING] [..] (target/release/deps/foo-[..][EXE])",
)
.with_either_contains(
"[..]thread '[..]' panicked at 'assertion failed: `(left == right)`[..]",
Expand Down Expand Up @@ -416,8 +416,8 @@ fn bench_with_lib_dep() {
"\
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]
[RUNNING] target/release/deps/baz-[..][EXE]",
[RUNNING] [..] (target/release/deps/foo-[..][EXE])
[RUNNING] [..] (target/release/deps/baz-[..][EXE])",
)
.with_stdout_contains("test lib_bench ... bench: [..]")
.with_stdout_contains("test bin_bench ... bench: [..]")
Expand Down Expand Up @@ -481,7 +481,7 @@ fn bench_with_deep_lib_dep() {
[COMPILING] foo v0.0.1 ([..])
[COMPILING] bar v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/bar-[..][EXE]",
[RUNNING] [..] (target/release/deps/bar-[..][EXE])",
)
.with_stdout_contains("test bar_bench ... bench: [..]")
.run();
Expand Down Expand Up @@ -538,8 +538,8 @@ fn external_bench_explicit() {
"\
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]
[RUNNING] target/release/deps/bench-[..][EXE]",
[RUNNING] [..] (target/release/deps/foo-[..][EXE])
[RUNNING] [..] (target/release/deps/bench-[..][EXE])",
)
.with_stdout_contains("test internal_bench ... bench: [..]")
.with_stdout_contains("test external_bench ... bench: [..]")
Expand Down Expand Up @@ -585,8 +585,8 @@ fn external_bench_implicit() {
"\
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]
[RUNNING] target/release/deps/external-[..][EXE]",
[RUNNING] [..] (target/release/deps/foo-[..][EXE])
[RUNNING] [..] (target/release/deps/external-[..][EXE])",
)
.with_stdout_contains("test internal_bench ... bench: [..]")
.with_stdout_contains("test external_bench ... bench: [..]")
Expand Down Expand Up @@ -664,7 +664,7 @@ For more information on this warning you can consult
https://github.com/rust-lang/cargo/issues/5330
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]
[RUNNING] [..] (target/release/deps/foo-[..][EXE])
",
)
.run();
Expand Down Expand Up @@ -711,15 +711,15 @@ fn pass_through_command_line() {
"\
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]",
[RUNNING] [..] (target/release/deps/foo-[..][EXE])",
)
.with_stdout_contains("test bar ... bench: [..]")
.run();

p.cargo("bench foo")
.with_stderr(
"[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]",
[RUNNING] [..] (target/release/deps/foo-[..][EXE])",
)
.with_stdout_contains("test foo ... bench: [..]")
.run();
Expand Down Expand Up @@ -804,8 +804,8 @@ fn lib_bin_same_name() {
"\
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]
[RUNNING] target/release/deps/foo-[..][EXE]",
[RUNNING] [..] (target/release/deps/foo-[..][EXE])
[RUNNING] [..] (target/release/deps/foo-[..][EXE])",
)
.with_stdout_contains_n("test [..] ... bench: [..]", 2)
.run();
Expand Down Expand Up @@ -853,8 +853,8 @@ fn lib_with_standard_name() {
"\
[COMPILING] syntax v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/syntax-[..][EXE]
[RUNNING] target/release/deps/bench-[..][EXE]",
[RUNNING] [..] (target/release/deps/syntax-[..][EXE])
[RUNNING] [..] (target/release/deps/bench-[..][EXE])",
)
.with_stdout_contains("test foo_bench ... bench: [..]")
.with_stdout_contains("test bench ... bench: [..]")
Expand Down Expand Up @@ -905,7 +905,7 @@ fn lib_with_standard_name2() {
"\
[COMPILING] syntax v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/syntax-[..][EXE]",
[RUNNING] [..] (target/release/deps/syntax-[..][EXE])",
)
.with_stdout_contains("test bench ... bench: [..]")
.run();
Expand Down Expand Up @@ -1040,15 +1040,15 @@ fn bench_twice_with_build_cmd() {
"\
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]",
[RUNNING] [..] (target/release/deps/foo-[..][EXE])",
)
.with_stdout_contains("test foo ... bench: [..]")
.run();

p.cargo("bench")
.with_stderr(
"[FINISHED] bench [optimized] target(s) in [..]
[RUNNING] target/release/deps/foo-[..][EXE]",
[RUNNING] [..] (target/release/deps/foo-[..][EXE])",
)
.with_stdout_contains("test foo ... bench: [..]")
.run();
Expand Down Expand Up @@ -1175,7 +1175,7 @@ fn test_a_bench() {
"\
[COMPILING] foo v0.1.0 ([..])
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target/debug/deps/b-[..][EXE]",
[RUNNING] [..] (target/debug/deps/b-[..][EXE])",
)
.with_stdout_contains("test foo ... ok")
.run();
Expand Down Expand Up @@ -1251,9 +1251,9 @@ fn test_bench_no_fail_fast() {

p.cargo("bench --no-fail-fast -- --test-threads=1")
.with_status(101)
.with_stderr_contains("[RUNNING] target/release/deps/foo-[..][EXE]")
.with_stderr_contains("[RUNNING] [..] (target/release/deps/foo-[..][EXE])")
.with_stdout_contains("running 2 tests")
.with_stderr_contains("[RUNNING] target/release/deps/foo-[..][EXE]")
.with_stderr_contains("[RUNNING] [..] (target/release/deps/foo-[..][EXE])")
.with_stdout_contains("test bench_hello [..]")
.with_stdout_contains("test bench_nope [..]")
.run();
Expand Down Expand Up @@ -1345,9 +1345,9 @@ fn test_bench_multiple_packages() {
.build();

p.cargo("bench -p bar -p baz")
.with_stderr_contains("[RUNNING] target/release/deps/bbaz-[..][EXE]")
.with_stderr_contains("[RUNNING] [..] (target/release/deps/bbaz-[..][EXE])")
.with_stdout_contains("test bench_baz ... bench: [..]")
.with_stderr_contains("[RUNNING] target/release/deps/bbar-[..][EXE]")
.with_stderr_contains("[RUNNING] [..] (target/release/deps/bbar-[..][EXE])")
.with_stdout_contains("test bench_bar ... bench: [..]")
.run();
}
Expand Down Expand Up @@ -1402,9 +1402,9 @@ fn bench_all_workspace() {
.build();

p.cargo("bench --workspace")
.with_stderr_contains("[RUNNING] target/release/deps/bar-[..][EXE]")
.with_stderr_contains("[RUNNING] [..] (target/release/deps/bar-[..][EXE])")
.with_stdout_contains("test bench_bar ... bench: [..]")
.with_stderr_contains("[RUNNING] target/release/deps/foo-[..][EXE]")
.with_stderr_contains("[RUNNING] [..] (target/release/deps/foo-[..][EXE])")
.with_stdout_contains("test bench_foo ... bench: [..]")
.run();
}
Expand Down Expand Up @@ -1553,9 +1553,9 @@ fn bench_all_virtual_manifest() {

// The order in which bar and baz are built is not guaranteed
p.cargo("bench --workspace")
.with_stderr_contains("[RUNNING] target/release/deps/baz-[..][EXE]")
.with_stderr_contains("[RUNNING] [..] (target/release/deps/baz-[..][EXE])")
.with_stdout_contains("test bench_baz ... bench: [..]")
.with_stderr_contains("[RUNNING] target/release/deps/bar-[..][EXE]")
.with_stderr_contains("[RUNNING] [..] (target/release/deps/bar-[..][EXE])")
.with_stdout_contains("test bench_bar ... bench: [..]")
.run();
}
Expand Down Expand Up @@ -1606,9 +1606,9 @@ fn bench_virtual_manifest_glob() {

// The order in which bar and baz are built is not guaranteed
p.cargo("bench -p '*z'")
.with_stderr_contains("[RUNNING] target/release/deps/baz-[..][EXE]")
.with_stderr_contains("[RUNNING] [..] (target/release/deps/baz-[..][EXE])")
.with_stdout_contains("test bench_baz ... bench: [..]")
.with_stderr_does_not_contain("[RUNNING] target/release/deps/bar-[..][EXE]")
.with_stderr_does_not_contain("[RUNNING] [..] (target/release/deps/bar-[..][EXE])")
.with_stdout_does_not_contain("test bench_bar ... bench: [..]")
.run();
}
Expand Down Expand Up @@ -1699,9 +1699,9 @@ fn bench_virtual_manifest_all_implied() {
// The order in which bar and baz are built is not guaranteed

p.cargo("bench")
.with_stderr_contains("[RUNNING] target/release/deps/baz-[..][EXE]")
.with_stderr_contains("[RUNNING] [..] (target/release/deps/baz-[..][EXE])")
.with_stdout_contains("test bench_baz ... bench: [..]")
.with_stderr_contains("[RUNNING] target/release/deps/bar-[..][EXE]")
.with_stderr_contains("[RUNNING] [..] (target/release/deps/bar-[..][EXE])")
.with_stdout_contains("test bench_bar ... bench: [..]")
.run();
}
Expand Down
12 changes: 6 additions & 6 deletions tests/testsuite/cross_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ fn cross_tests() {
"\
[COMPILING] foo v0.0.0 ([CWD])
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target/{triple}/debug/deps/foo-[..][EXE]
[RUNNING] target/{triple}/debug/deps/bar-[..][EXE]",
[RUNNING] [..] (target/{triple}/debug/deps/foo-[..][EXE])
[RUNNING] [..] (target/{triple}/debug/deps/bar-[..][EXE])",
triple = target
))
.with_stdout_contains("test test_foo ... ok")
Expand Down Expand Up @@ -380,7 +380,7 @@ fn no_cross_doctests() {
let host_output = "\
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target/debug/deps/foo-[..][EXE]
[RUNNING] [..] (target/debug/deps/foo-[..][EXE])
[DOCTEST] foo
";

Expand All @@ -395,7 +395,7 @@ fn no_cross_doctests() {
"\
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target/{triple}/debug/deps/foo-[..][EXE]
[RUNNING] [..] (target/{triple}/debug/deps/foo-[..][EXE])
[DOCTEST] foo
",
triple = target
Expand Down Expand Up @@ -1060,8 +1060,8 @@ fn cross_test_dylib() {
[COMPILING] bar v0.0.1 ([CWD]/bar)
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target/{arch}/debug/deps/foo-[..][EXE]
[RUNNING] target/{arch}/debug/deps/test-[..][EXE]",
[RUNNING] [..] (target/{arch}/debug/deps/foo-[..][EXE])
[RUNNING] [..] (target/{arch}/debug/deps/test-[..][EXE])",
arch = cross_compile::alternate()
))
.with_stdout_contains_n("test foo ... ok", 2)
Expand Down
6 changes: 3 additions & 3 deletions tests/testsuite/freshness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ fn changing_profiles_caches_targets() {
"\
[..]Compiling foo v0.0.1 ([..])
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]debug[..]deps[..]foo-[..][EXE]
[RUNNING] [..] (target[..]debug[..]deps[..]foo-[..][EXE])
[DOCTEST] foo
",
)
Expand All @@ -268,7 +268,7 @@ fn changing_profiles_caches_targets() {
.with_stderr(
"\
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[..]debug[..]deps[..]foo-[..][EXE]
[RUNNING] [..] (target[..]debug[..]deps[..]foo-[..][EXE])
",
)
.run();
Expand Down Expand Up @@ -2441,7 +2441,7 @@ fn linking_interrupted() {
"\
[COMPILING] foo [..]
[FINISHED] [..]
[RUNNING] target/debug/deps/t1[..]
[RUNNING] tests/t1.rs (target/debug/deps/t1[..])
",
)
.run();
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ fn dev_deps_with_testing() {
[COMPILING] [..] v0.5.0 ([..])
[COMPILING] [..] v0.5.0 ([..]
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target/debug/deps/foo-[..][EXE]",
[RUNNING] [..] (target/debug/deps/foo-[..][EXE])",
)
.with_stdout_contains("test tests::foo ... ok")
.run();
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ fn cargo_compile_with_root_dev_deps_with_testing() {
[COMPILING] [..] v0.5.0 ([..])
[COMPILING] [..] v0.5.0 ([..])
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target/debug/deps/foo-[..][EXE]",
[RUNNING] [..] (target/debug/deps/foo-[..][EXE])",
)
.with_stdout_contains("running 0 tests")
.run();
Expand Down Expand Up @@ -770,7 +770,7 @@ fn dev_deps_no_rebuild_lib() {
[COMPILING] [..] v0.5.0 ([CWD][..])
[COMPILING] [..] v0.5.0 ([CWD][..])
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target/debug/deps/foo-[..][EXE]",
[RUNNING] [..] (target/debug/deps/foo-[..][EXE])",
)
.with_stdout_contains("running 0 tests")
.run();
Expand Down
Loading

0 comments on commit 04c8372

Please sign in to comment.