From 82a51c9111fbf5a5e429b9fd0afb1e2dedebc5fd Mon Sep 17 00:00:00 2001 From: Rob Walker Date: Tue, 16 Oct 2018 17:29:47 -0700 Subject: [PATCH 1/2] remove another use of /tmp --- tests/multinode.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/multinode.rs b/tests/multinode.rs index b0115e9f125f25..5eeba4acc9e9ee 100644 --- a/tests/multinode.rs +++ b/tests/multinode.rs @@ -80,9 +80,11 @@ fn converge(leader: &NodeInfo, num_nodes: usize) -> Vec { } fn tmp_ledger_path(name: &str) -> String { + use std::env; + let out_dir = env::var("OUT_DIR").unwrap_or_else(|_| "target".to_string()); let keypair = Keypair::new(); - format!("/tmp/tmp-ledger-{}-{}", name, keypair.pubkey()) + format!("{}/tmp/ledger-{}-{}", out_dir, name, keypair.pubkey()); } fn genesis(name: &str, num: i64) -> (Mint, String, Vec) { From af1ef8ae065cfa457b8c37f0c1772d5a1cc31201 Mon Sep 17 00:00:00 2001 From: Rob Walker Date: Wed, 17 Oct 2018 09:27:44 -0700 Subject: [PATCH 2/2] move off /tmp --- tests/multinode.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/multinode.rs b/tests/multinode.rs index 5eeba4acc9e9ee..d35835d11f7814 100644 --- a/tests/multinode.rs +++ b/tests/multinode.rs @@ -84,7 +84,7 @@ fn tmp_ledger_path(name: &str) -> String { let out_dir = env::var("OUT_DIR").unwrap_or_else(|_| "target".to_string()); let keypair = Keypair::new(); - format!("{}/tmp/ledger-{}-{}", out_dir, name, keypair.pubkey()); + format!("{}/tmp/ledger-{}-{}", out_dir, name, keypair.pubkey()) } fn genesis(name: &str, num: i64) -> (Mint, String, Vec) {