Skip to content

Commit 008cf8d

Browse files
committed
Added test for build-dir v2 layout
1 parent 25117e3 commit 008cf8d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/test.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,27 @@ fn build_dir() {
155155
run("build_dir", "build_dir", &[], &[]);
156156
}
157157

158+
// https://github.com/rust-lang/cargo/issues/15010
159+
// -Zbuild-dir-new-layout is not yet stable
160+
#[rustversion::attr(not(nightly), ignore)]
161+
#[test]
162+
fn build_dir_layout_v2() {
163+
run("real1", "workspace_root", &[], &[("CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT", "true")]);
164+
run("real1", "all", &["--all"], &[("CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT", "true")]);
165+
run("real1", "manifest_path", &["--manifest-path", "member1/member2/Cargo.toml"], &[(
166+
"CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT",
167+
"true",
168+
)]);
169+
run("real1", "package1", &["--package", "member2"], &[(
170+
"CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT",
171+
"true",
172+
)]);
173+
run("real1", "exclude", &["--all", "--exclude", "crate1"], &[(
174+
"CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT",
175+
"true",
176+
)]);
177+
}
178+
158179
// https://github.com/taiki-e/cargo-llvm-cov/issues/303
159180
// 1.88 fixed bug in report generation, so the latest report is not the same as the old report.
160181
#[rustversion::attr(before(1.88), ignore)]

0 commit comments

Comments
 (0)