no more OUT_DIR (#5139)
* no more OUT_DIR * no more OUT_DIR * more information about failure
This commit is contained in:
@ -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!(
|
||||
"{}/{}/{}/{}",
|
||||
|
@ -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))
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user