Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch wasmer_vfs::host_fs tests over to using temp directories #3676

Merged
merged 2 commits into from
Mar 14, 2023

Conversation

Michael-F-Bryan
Copy link
Contributor

The unit tests in wasmer_vfs::host_fs currently write to the test directory.

This PR switches them over to using a tempfile::TempDir because a) it's cleaner, and more importantly, b) it means cargo watch won't peg the CPU to 100% because running the tests updates files inside the src/ folder, which in turn triggers a re-run of cargo watch, which causes the crate to be recompiled and all the tests to start again.

@Michael-F-Bryan Michael-F-Bryan changed the title Switch wasmer_vfs::host_fs tests over to using a temp directory Switch wasmer_vfs::host_fs tests over to using temp directories Mar 13, 2023
@Michael-F-Bryan Michael-F-Bryan marked this pull request as ready for review March 13, 2023 06:13
Copy link
Contributor

@ptitSeb ptitSeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@Michael-F-Bryan Michael-F-Bryan merged commit d1d1a47 into master Mar 14, 2023
@Michael-F-Bryan Michael-F-Bryan deleted the vfs-tempdir branch March 14, 2023 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants