Script to clone the rust-lang/rust repo
diff --git a/tests/common/mod.rs b/tests/common/mod.rs
index 91aaa61..451d2de 100644
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -4,7 +4,6 @@
extern crate syntax;
use std::env;
-use std::path::Path;
use std::process::Command;
use std::u32;
@@ -109,29 +108,7 @@
}
pub fn clone_rust() {
- if Path::new("tests/rust").is_dir() {
- println!("found rust repo in tests/rust");
- return;
- }
-
- println!("cloning rust-lang/rust");
- let result = Command::new("git")
- .arg("clone")
- .arg("https://github.com/rust-lang/rust")
- .arg("tests/rust")
- .status()
- .unwrap();
- println!("result: {}", result);
- assert!(result.success());
-
- println!("reset to known-good rev");
- let result = Command::new("git")
- .arg("reset")
- .arg("--hard")
- .arg("eb8f2586ebd842dec49d3d7f50e49a985ab31493")
- .current_dir("tests/rust")
- .status()
- .unwrap();
+ let result = Command::new("tests/rust/clone.sh").status().unwrap();
println!("result: {}", result);
assert!(result.success());
}