-
Notifications
You must be signed in to change notification settings - Fork 5
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
Execute model checkers in a temporary directory #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tempfile
code looks good to me. But we can probably remove the walkdir
dependency.
modelator/src/util.rs
Outdated
for entry in WalkDir::new(dir) | ||
.min_depth(1) | ||
.max_depth(1) | ||
.into_iter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need walkdir
for this? std::fs::read_dir
should be enough, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! How about you refactor this to use std::fs::read_dir
, right in this branch? it would be great to avoid an additional dependency, true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Ran cargo test
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, looks good!
thanks:)
This closes #33 via a simple workaround, by adding the code to the
traces()
function that:.tla
and.cfg
files into itThis prevents polluting the current directory with temporary files from generating the tests, as well as from the model checkers' output.
Some tests have been written under the assumptions that are incompatible with using the temporary directories, so those have been disabled; the refactoring to be tracked in #47.
The cache has been disabled as well; this is to be tracked in #46.