()
| 236 | } |
| 237 | |
| 238 | pub fn root() -> PathBuf { |
| 239 | let id = TEST_ID.with(|n| { |
| 240 | n.borrow() |
| 241 | .expect("Tests must call `init_root` to use the crate root.") |
| 242 | }); |
| 243 | |
| 244 | let mut root = global_root(); |
| 245 | root.push(format!("t{}-{}", std::process::id(), id)); |
| 246 | root |
| 247 | } |
| 248 | |
| 249 | fn set_global_root() { |
| 250 | let mut lock = GLOBAL_ROOT.get_or_init(Default::default).lock().unwrap(); |
no test coverage detected