Bladeren bron

tmp dirs target to farf (#5079)

Rob Walker 6 jaren geleden
bovenliggende
commit
0d27515d09
70 gewijzigde bestanden met toevoegingen van 79 en 13 verwijderingen
  1. 1 0
      bench-exchange/.gitignore
  2. 1 0
      bench-streamer/.gitignore
  3. 1 0
      bench-tps/.gitignore
  4. 1 0
      chacha-sys/.gitignore
  5. 8 2
      ci/nits.sh
  6. 1 0
      client/.gitignore
  7. 1 0
      core/.gitignore
  8. 2 2
      core/src/bank_forks.rs
  9. 2 2
      core/src/blocktree.rs
  10. 1 1
      core/src/replicator.rs
  11. 1 0
      drone/.gitignore
  12. 1 0
      genesis/.gitignore
  13. 1 0
      gossip/.gitignore
  14. 1 0
      install/.gitignore
  15. 1 0
      keygen/.gitignore
  16. 1 0
      kvstore/.gitignore
  17. 1 0
      ledger-tool/.gitignore
  18. 1 0
      logger/.gitignore
  19. 1 0
      measure/.gitignore
  20. 1 0
      merkle-tree/.gitignore
  21. 1 0
      metrics/.gitignore
  22. 1 0
      netutil/.gitignore
  23. 1 0
      programs/bpf/.gitignore
  24. 1 0
      programs/bpf/rust/128bit/.gitignore
  25. 1 0
      programs/bpf/rust/128bit_dep/.gitignore
  26. 1 0
      programs/bpf/rust/alloc/.gitignore
  27. 1 0
      programs/bpf/rust/dep_crate/.gitignore
  28. 1 0
      programs/bpf/rust/external_spend/.gitignore
  29. 1 0
      programs/bpf/rust/iter/.gitignore
  30. 1 0
      programs/bpf/rust/many_args/.gitignore
  31. 1 0
      programs/bpf/rust/many_args_dep/.gitignore
  32. 1 0
      programs/bpf/rust/noop/.gitignore
  33. 1 0
      programs/bpf/rust/panic/.gitignore
  34. 1 0
      programs/bpf/rust/tick_height/.gitignore
  35. 1 0
      programs/bpf_loader_api/.gitignore
  36. 1 0
      programs/bpf_loader_program/.gitignore
  37. 1 0
      programs/budget_api/.gitignore
  38. 1 0
      programs/budget_program/.gitignore
  39. 1 0
      programs/config_api/.gitignore
  40. 1 0
      programs/config_program/.gitignore
  41. 1 0
      programs/exchange_api/.gitignore
  42. 1 0
      programs/exchange_program/.gitignore
  43. 1 0
      programs/failure_program/.gitignore
  44. 1 0
      programs/noop_program/.gitignore
  45. 1 0
      programs/stake_api/.gitignore
  46. 1 0
      programs/stake_program/.gitignore
  47. 1 0
      programs/stake_tests/.gitignore
  48. 1 0
      programs/storage_api/.gitignore
  49. 1 0
      programs/storage_program/.gitignore
  50. 1 0
      programs/token_api/.gitignore
  51. 1 0
      programs/token_program/.gitignore
  52. 1 0
      programs/vote_api/.gitignore
  53. 1 0
      programs/vote_program/.gitignore
  54. 1 0
      replicator/.gitignore
  55. 1 0
      runtime/.gitignore
  56. 1 1
      runtime/src/accounts.rs
  57. 1 1
      runtime/src/accounts_db.rs
  58. 1 1
      runtime/src/append_vec.rs
  59. 1 0
      sdk/.gitignore
  60. 1 0
      sdk/bpf/rust/rust-no-std/.gitignore
  61. 1 0
      sdk/bpf/rust/rust-test/.gitignore
  62. 1 0
      sdk/bpf/rust/rust-utils/.gitignore
  63. 1 1
      sdk/src/genesis_block.rs
  64. 1 1
      sdk/src/signature.rs
  65. 1 0
      upload-perf/.gitignore
  66. 1 0
      validator-info/.gitignore
  67. 1 0
      validator/.gitignore
  68. 1 0
      vote-signer/.gitignore
  69. 1 0
      wallet/.gitignore
  70. 1 1
      wallet/src/wallet.rs

+ 1 - 0
bench-exchange/.gitignore

@@ -1,3 +1,4 @@
 /target/
 /config/
 /config-local/
+/farf/

+ 1 - 0
bench-streamer/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
bench-tps/.gitignore

@@ -1,3 +1,4 @@
 /target/
 /config/
 /config-local/
+/farf/

+ 1 - 0
chacha-sys/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 8 - 2
ci/nits.sh

@@ -46,16 +46,22 @@ if _ git --no-pager grep -n 'Default::default()' -- '*.rs'; then
 fi
 
 # Let's keep a .gitignore for every crate, ensure it's got
-#  /target/ in it
+#  /target/ and /farf/ in it
 declare gitignores_ok=true
 for i in $(git --no-pager ls-files \*/Cargo.toml ); do
   dir=$(dirname "$i")
   if [[ ! -f $dir/.gitignore ]]; then
       echo 'error: nits.sh .gitnore missing for crate '"$dir" >&2
       gitignores_ok=false
-  elif ! grep -q -e '^/target/$' "$dir"/.gitignore; then
+  else
+    if ! grep -q -e '^/target/$' "$dir"/.gitignore; then
       echo 'error: nits.sh "/target/" apparently missing from '"$dir"'/.gitignore' >&2
       gitignores_ok=false
+    fi
+    if ! grep -q -e '^/farf/$' "$dir"/.gitignore ; then
+      echo 'error: nits.sh "/farf/" apparently missing from '"$dir"'/.gitignore' >&2
+      gitignores_ok=false
+    fi
   fi
 done
 "$gitignores_ok"

+ 1 - 0
client/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
core/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 2 - 2
core/src/bank_forks.rs

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

+ 2 - 2
core/src/blocktree.rs

@@ -1820,10 +1820,10 @@ macro_rules! get_tmp_ledger_path {
 
 pub fn get_tmp_ledger_path(name: &str) -> String {
     use std::env;
-    let out_dir = env::var("OUT_DIR").unwrap_or_else(|_| "target".to_string());
+    let out_dir = env::var("OUT_DIR").unwrap_or_else(|_| "farf".to_string());
     let keypair = Keypair::new();
 
-    let path = format!("{}/tmp/ledger/{}-{}", out_dir, name, keypair.pubkey());
+    let path = format!("{}/ledger/{}-{}", out_dir, name, keypair.pubkey());
 
     // whack any possible collision
     let _ignored = fs::remove_dir_all(&path);

+ 1 - 1
core/src/replicator.rs

@@ -910,7 +910,7 @@ mod tests {
 
     fn tmp_file_path(name: &str) -> PathBuf {
         use std::env;
-        let out_dir = env::var("OUT_DIR").unwrap_or_else(|_| "target".to_string());
+        let out_dir = env::var("OUT_DIR").unwrap_or_else(|_| "farf".to_string());
         let keypair = Keypair::new();
 
         let mut path = PathBuf::new();

+ 1 - 0
drone/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
genesis/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
gossip/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
install/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
keygen/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
kvstore/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
ledger-tool/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
logger/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
measure/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
merkle-tree/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
metrics/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
netutil/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/bpf/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/bpf/rust/128bit/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
programs/bpf/rust/128bit_dep/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
programs/bpf/rust/alloc/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
programs/bpf/rust/dep_crate/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
programs/bpf/rust/external_spend/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
programs/bpf/rust/iter/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
programs/bpf/rust/many_args/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
programs/bpf/rust/many_args_dep/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
programs/bpf/rust/noop/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
programs/bpf/rust/panic/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
programs/bpf/rust/tick_height/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
programs/bpf_loader_api/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/bpf_loader_program/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/budget_api/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/budget_program/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/config_api/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/config_program/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/exchange_api/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/exchange_program/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/failure_program/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/noop_program/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/stake_api/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/stake_program/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/stake_tests/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/storage_api/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/storage_program/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/token_api/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/token_program/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/vote_api/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
programs/vote_program/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
replicator/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
runtime/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 1
runtime/src/accounts.rs

@@ -77,7 +77,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(|_| "target".to_string());
+        let out_dir = env::var("OUT_DIR").unwrap_or_else(|_| "farf".to_string());
         let keypair = Keypair::new();
         format!(
             "{}/{}/{}/{}",

+ 1 - 1
runtime/src/accounts_db.rs

@@ -750,7 +750,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(|_| "target".to_string());
+        let out_dir = std::env::var("OUT_DIR").unwrap_or_else(|_| "farf".to_string());
         let vpaths: Vec<_> = vpaths
             .iter()
             .map(|path| format!("{}/{}", out_dir, path))

+ 1 - 1
runtime/src/append_vec.rs

@@ -298,7 +298,7 @@ pub mod test_utils {
     }
 
     pub fn get_append_vec_dir() -> String {
-        std::env::var("OUT_DIR").unwrap_or_else(|_| "target/append_vec_tests".to_string())
+        std::env::var("OUT_DIR").unwrap_or_else(|_| "farf/append_vec_tests".to_string())
     }
 
     pub fn get_append_vec_path(path: &str) -> TempFile {

+ 1 - 0
sdk/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
sdk/bpf/rust/rust-no-std/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
sdk/bpf/rust/rust-test/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 0
sdk/bpf/rust/rust-utils/.gitignore

@@ -1,3 +1,4 @@
 /target/
 
 Cargo.lock
+/farf/

+ 1 - 1
sdk/src/genesis_block.rs

@@ -194,7 +194,7 @@ mod tests {
     use crate::signature::{Keypair, KeypairUtil};
 
     fn make_tmp_path(name: &str) -> String {
-        let out_dir = std::env::var("OUT_DIR").unwrap_or_else(|_| "target".to_string());
+        let out_dir = std::env::var("OUT_DIR").unwrap_or_else(|_| "farf".to_string());
         let keypair = Keypair::new();
 
         let path = format!("{}/tmp/{}-{}", out_dir, name, keypair.pubkey());

+ 1 - 1
sdk/src/signature.rs

@@ -147,7 +147,7 @@ mod tests {
 
     fn tmp_file_path(name: &str) -> String {
         use std::env;
-        let out_dir = env::var("OUT_DIR").unwrap_or_else(|_| "target".to_string());
+        let out_dir = env::var("OUT_DIR").unwrap_or_else(|_| "farf".to_string());
         let keypair = Keypair::new();
 
         format!("{}/tmp/{}-{}", out_dir, name, keypair.pubkey()).to_string()

+ 1 - 0
upload-perf/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
validator-info/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
validator/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
vote-signer/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 0
wallet/.gitignore

@@ -1 +1,2 @@
 /target/
+/farf/

+ 1 - 1
wallet/src/wallet.rs

@@ -1883,7 +1883,7 @@ mod tests {
         );
 
         fn make_tmp_path(name: &str) -> String {
-            let out_dir = std::env::var("OUT_DIR").unwrap_or_else(|_| "target".to_string());
+            let out_dir = std::env::var("OUT_DIR").unwrap_or_else(|_| "farf".to_string());
             let keypair = Keypair::new();
 
             let path = format!("{}/tmp/{}-{}", out_dir, name, keypair.pubkey());