Use TEST_OUTPUT envvar in pageserver (#5984)

This commit is contained in:
bojanserafimov
2023-12-01 09:16:24 -05:00
committed by GitHub
parent e49c21a3cd
commit fd81945a60

View File

@@ -855,7 +855,8 @@ impl PageServerConf {
#[cfg(test)]
pub fn test_repo_dir(test_name: &str) -> Utf8PathBuf {
Utf8PathBuf::from(format!("../tmp_check/test_{test_name}"))
let test_output_dir = std::env::var("TEST_OUTPUT").unwrap_or("../tmp_check".into());
Utf8PathBuf::from(format!("{test_output_dir}/test_{test_name}"))
}
pub fn dummy_conf(repo_dir: Utf8PathBuf) -> Self {