Skip to content

Commit 6f91278

Browse files
committed
Test cargo build being resilient to filesystem loop
1 parent 47b869c commit 6f91278

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/testsuite/build.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ package `test v0.0.0 ([CWD])`
16681668
}
16691669

16701670
#[cargo_test]
1671-
/// Make sure broken symlinks don't break the build
1671+
/// Make sure broken and loop symlinks don't break the build
16721672
///
16731673
/// This test requires you to be able to make symlinks.
16741674
/// For windows, this may require you to enable developer mode.
@@ -1681,6 +1681,10 @@ fn ignore_broken_symlinks() {
16811681
.file("Cargo.toml", &basic_bin_manifest("foo"))
16821682
.file("src/foo.rs", &main_file(r#""i am foo""#, &[]))
16831683
.symlink("Notafile", "bar")
1684+
// To hit the symlink directory, we need a build script
1685+
// to trigger a full scan of package files.
1686+
.file("build.rs", &main_file(r#""build script""#, &[]))
1687+
.symlink_dir("a/b", "a/b/c/d/foo")
16841688
.build();
16851689

16861690
p.cargo("build").run();

0 commit comments

Comments
 (0)