no more OUT_DIR (#5139)

* no more OUT_DIR

* no more OUT_DIR

* more information about failure
This commit is contained in:
Rob Walker
2019-07-17 14:27:58 -07:00
committed by GitHub
parent 0ffd91df27
commit 027ebb6670
9 changed files with 14 additions and 10 deletions

View File

@ -78,7 +78,7 @@ impl Accounts {
fn make_new_dir() -> String {
static ACCOUNT_DIR: AtomicUsize = AtomicUsize::new(0);
let dir = ACCOUNT_DIR.fetch_add(1, Ordering::Relaxed);
let out_dir = env::var("OUT_DIR").unwrap_or_else(|_| "farf".to_string());
let out_dir = env::var("FARF_DIR").unwrap_or_else(|_| "farf".to_string());
let keypair = Keypair::new();
format!(
"{}/{}/{}/{}",

View File

@ -789,7 +789,7 @@ mod tests {
fn get_tmp_accounts_path(paths: &str) -> TempPaths {
let vpaths = get_paths_vec(paths);
let out_dir = std::env::var("OUT_DIR").unwrap_or_else(|_| "farf".to_string());
let out_dir = std::env::var("FARF_DIR").unwrap_or_else(|_| "farf".to_string());
let vpaths: Vec<_> = vpaths
.iter()
.map(|path| format!("{}/{}", out_dir, path))

View File

@ -93,6 +93,10 @@ impl AppendVec {
.create(create)
.open(file)
.map_err(|e| {
warn!("in current dir {:?}", std::env::current_dir());
for ancestor in file.ancestors() {
warn!("{:?} is {:?}", ancestor, std::fs::metadata(ancestor));
}
panic!(
"Unable to {} data file {}, err {:?}",
if create { "create" } else { "open" },
@ -298,7 +302,7 @@ pub mod test_utils {
}
pub fn get_append_vec_dir() -> String {
std::env::var("OUT_DIR").unwrap_or_else(|_| "farf/append_vec_tests".to_string())
std::env::var("FARF_DIR").unwrap_or_else(|_| "farf/append_vec_tests".to_string())
}
pub fn get_append_vec_path(path: &str) -> TempFile {