-
Notifications
You must be signed in to change notification settings - Fork 15
Nextest support and update template #120
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
base: main
Are you sure you want to change the base?
Conversation
selecting the correct glam version manually when testing various spirv-std versions is hard
otherwise I can't build it
adc5b84 to
f181ba7
Compare
|
The template's spirv-std update included Rust-GPU/rust-gpu#380, which forces glam to |
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.
Our main::cache_dir() function already has a clause for tests:
Ok(if cfg!(test) {
let thread_id = std::thread::current().id();
let id = format!("{thread_id:?}").replace('(', "-").replace(')', "");
dir.join("tests").join(id)
} else {
dir
})So either we need to delete that or, what about if we pass the function the tempdirpath, like cache_dir(Option<PathBuf>)? I think it'd be nice to still be getting test coverage for that function.
But now I'm wondering about tempdir's default use of Drop to automate the directory removal. What if shader_crate_test_path() returned tempfile::TempDir? Would that mean we don't need the thread-local TEMPDIR nor even the tests_teardown?
The main reason behind removing this condition and replacing it with This is because of the following neat reason: when the parent crate has this cfg set in its own tests, child crate (which is dependent on the parent) does not have this cfg set, and so cache dir is always the same for all its tests (which is just
I really hope this hack (due to the lack of Also we could provide an optional path argument for
I haven't thought about that in my PR: I've just tried to preserve testing logic as much as possible (at that moment). |
f181ba7 to
274e658
Compare
cargo nextest runnow worksspirv-toolsfails to build, see rust-gpu master / spirv-tools fails to build on latest nix rust-gpu#370)