Skip to content

Commit 970a859

Browse files
author
Johanna
committed
update github workflow with debug statements
1 parent a873551 commit 970a859

File tree

1 file changed

+35
-15
lines changed

1 file changed

+35
-15
lines changed

tests/common/mod.rs

+35-15
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,43 @@ pub struct TestSetup {
3636
impl TestSetup {
3737
pub fn setup() -> Self {
3838
let wd = assert_fs::TempDir::new().unwrap();
39-
wd.child(SYM_IN)
40-
.symlink_to_dir(
41-
Path::new(FILE_IN)
42-
.canonicalize()
43-
.expect("Could not link expected files"),
44-
)
45-
.unwrap();
46-
wd.child(SYM_TEST)
47-
.symlink_to_dir(
48-
Path::new(FILE_TEST)
49-
.canonicalize()
50-
.expect("Could not link expected files"),
51-
)
52-
.unwrap();
39+
40+
// Debug: Print current working directory
41+
println!("Current working directory: {:?}", std::env::current_dir().unwrap());
42+
43+
// Debug: Print FILE_IN and FILE_TEST paths
44+
println!("FILE_IN path: {:?}", Path::new(FILE_IN).canonicalize());
45+
println!("FILE_TEST path: {:?}", Path::new(FILE_TEST).canonicalize());
46+
47+
// Attempt to create symlink for SYM_IN
48+
match wd.child(SYM_IN).symlink_to_dir(
49+
Path::new(FILE_IN)
50+
.canonicalize()
51+
.expect("Could not canonicalize FILE_IN path")
52+
) {
53+
Ok(_) => println!("Successfully created symlink for {}", SYM_IN),
54+
Err(e) => println!("Failed to create symlink for {}: {:?}", SYM_IN, e),
55+
}
56+
57+
// Attempt to create symlink for SYM_TEST
58+
match wd.child(SYM_TEST).symlink_to_dir(
59+
Path::new(FILE_TEST)
60+
.canonicalize()
61+
.expect("Could not canonicalize FILE_TEST path")
62+
) {
63+
Ok(_) => println!("Successfully created symlink for {}", SYM_TEST),
64+
Err(e) => println!("Failed to create symlink for {}: {:?}", SYM_TEST, e),
65+
}
66+
67+
// Debug: Print contents of temporary directory
68+
println!("Contents of temporary directory:");
69+
for entry in std::fs::read_dir(&wd.path()).unwrap() {
70+
let entry = entry.unwrap();
71+
println!(" {:?}", entry.path());
72+
}
73+
5374
Self { wd }
5475
}
55-
5676
pub fn get_wd(&self) -> String {
5777
self.wd.path().display().to_string()
5878
}

0 commit comments

Comments
 (0)