diff --git a/src/config/test_case.rs b/src/config/test_case.rs index aee3dd6..ed779c9 100644 --- a/src/config/test_case.rs +++ b/src/config/test_case.rs @@ -68,9 +68,14 @@ impl Default for TestCaseConfig { with_light_client_prover: false, with_full_node: false, timeout: Duration::from_secs(60), - dir: TempDir::new() - .expect("Failed to create temporary directory") - .into_path(), + dir: std::env::var("TEST_OUT_DIR").map_or_else( + |_| { + TempDir::new() + .expect("Failed to create temporary directory") + .into_path() + }, + PathBuf::from, + ), docker: TestCaseDockerConfig::default(), genesis_dir: None, }