Skip to content

Commit

Permalink
clean the environment in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Coenen <[email protected]>
  • Loading branch information
bnjjj committed Sep 9, 2021
1 parent a3f1a18 commit f449ae5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Binary file modified tests/wasi-wast/wasi/snapshot1/fd_rename_path.wasm
Binary file not shown.
4 changes: 4 additions & 0 deletions tests/wasi-wast/wasi/tests/fd_rename_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ use std::path::PathBuf;
fn main() {
let old_path = PathBuf::from("test_fs/wasitests/dirtorename");
let new_path = PathBuf::from("test_fs/wasitests/dirrenamed");
// Clean the test environment
let _ = fs::remove_dir(&old_path);
let _ = fs::remove_dir(&new_path);

fs::create_dir_all(&old_path).expect("cannot create the directory");

fs::rename(old_path, &new_path).expect("cannot rename the directory");
Expand Down

0 comments on commit f449ae5

Please sign in to comment.