test(build-std): expand assertion to ensure no index update

This commit is contained in:
Weihang Lo 2024-08-05 23:20:39 -04:00
parent fa64658367
commit 9af3930321
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7

View File

@ -119,8 +119,31 @@ fn basic() {
"#]])
.run();
p.cargo("run").build_std().target_host().run();
p.cargo("test").build_std().target_host().run();
p.cargo("run")
.build_std()
.target_host()
.with_stderr_data(str![[r#"
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
[RUNNING] `target/[HOST_TARGET]/debug/foo`
"#]])
.run();
p.cargo("test")
.build_std()
.target_host()
.with_stderr_data(str![[r#"
[COMPILING] rustc-std-workspace-std [..]
...
[COMPILING] test v0.0.0 ([..])
[COMPILING] foo v0.0.1 ([ROOT]/foo)
[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
[RUNNING] unittests src/lib.rs (target/[HOST_TARGET]/debug/deps/foo-[HASH])
[RUNNING] unittests src/main.rs (target/[HOST_TARGET]/debug/deps/foo-[HASH])
[RUNNING] tests/smoke.rs (target/[HOST_TARGET]/debug/deps/smoke-[HASH])
[DOCTEST] foo
"#]])
.run();
// Check for hack that removes dylibs.
let deps_dir = Path::new("target")