File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ use std::io::Write as _;
88use std:: path:: PathBuf ;
99use tempfile:: TempDir ;
1010
11+ /// `TestEnv` sets up a temp dir in `./target/cargo-gpu-test/` that is used as the cache dir. Not initializing a
12+ /// `TestEnv` and asking for the cache dir will panic, to ensure you set it up. Calling [`Self::setup_shader_crate`]
13+ /// or [`Self::setup_shader_crate_with_cargo_toml`] will copy the `shader_crate_template` into the temp dir and return
14+ /// you the path to it, so each test now has it's unique copy and won't race to change the template in the repo.
15+ /// Dropping `TestEnv` will clean up the dir, except when panic unwinding, so you can debug failures.
1116#[ must_use]
1217pub struct TestEnv ( TempDir ) ;
1318
You can’t perform that action at this time.
0 commit comments