about summary refs log tree commit diff
path: root/src/librustpkg
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2013-04-22 17:56:15 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-04-24 17:51:31 -0700
commitf945e57bd050227bbf92f151303785991173f2fe (patch)
tree6c0906478653c876c8b1395274c6fd48d83135e9 /src/librustpkg
parent6a3e26aa4062019629e144196a7852ef039f8b0a (diff)
rustpkg: Correct directory structure in test scenarios
Diffstat (limited to 'src/librustpkg')
-rw-r--r--src/librustpkg/testsuite/pass/src/fancy-lib/bar.rs (renamed from src/librustpkg/testsuite/pass/src/fancy-lib/src/bar.rs)0
-rw-r--r--src/librustpkg/testsuite/pass/src/fancy-lib/fancy-lib.rs (renamed from src/librustpkg/testsuite/pass/src/fancy-lib/src/fancy-lib.rs)2
-rw-r--r--src/librustpkg/testsuite/pass/src/fancy-lib/foo.rs (renamed from src/librustpkg/testsuite/pass/src/fancy-lib/src/foo.rs)0
-rw-r--r--src/librustpkg/testsuite/pass/src/fancy-lib/pkg.rs15
-rw-r--r--src/librustpkg/testsuite/pass/src/hello-world/main.rs (renamed from src/librustpkg/testsuite/pass/src/hello-world/src/main.rs)0
-rw-r--r--src/librustpkg/testsuite/pass/src/install-paths/bench.rs (renamed from src/librustpkg/testsuite/pass/src/install-paths/src/bench.rs)0
-rw-r--r--src/librustpkg/testsuite/pass/src/install-paths/lib.rs (renamed from src/librustpkg/testsuite/pass/src/install-paths/src/lib.rs)0
-rw-r--r--src/librustpkg/testsuite/pass/src/install-paths/main.rs (renamed from src/librustpkg/testsuite/pass/src/install-paths/src/main.rs)0
-rw-r--r--src/librustpkg/testsuite/pass/src/install-paths/test.rs (renamed from src/librustpkg/testsuite/pass/src/install-paths/src/test.rs)0
9 files changed, 11 insertions, 6 deletions
diff --git a/src/librustpkg/testsuite/pass/src/fancy-lib/src/bar.rs b/src/librustpkg/testsuite/pass/src/fancy-lib/bar.rs
index ffbc6e2a7f9..ffbc6e2a7f9 100644
--- a/src/librustpkg/testsuite/pass/src/fancy-lib/src/bar.rs
+++ b/src/librustpkg/testsuite/pass/src/fancy-lib/bar.rs
diff --git a/src/librustpkg/testsuite/pass/src/fancy-lib/src/fancy-lib.rs b/src/librustpkg/testsuite/pass/src/fancy-lib/fancy-lib.rs
index 55261a82098..dc068eed143 100644
--- a/src/librustpkg/testsuite/pass/src/fancy-lib/src/fancy-lib.rs
+++ b/src/librustpkg/testsuite/pass/src/fancy-lib/fancy-lib.rs
@@ -21,4 +21,4 @@ extern mod std;
 
 pub mod foo;
 pub mod bar;
-#[path = "build/generated.rs"] pub mod generated;
+#[path = "../../build/fancy_lib/generated.rs"] pub mod generated;
diff --git a/src/librustpkg/testsuite/pass/src/fancy-lib/src/foo.rs b/src/librustpkg/testsuite/pass/src/fancy-lib/foo.rs
index 542a6af402d..542a6af402d 100644
--- a/src/librustpkg/testsuite/pass/src/fancy-lib/src/foo.rs
+++ b/src/librustpkg/testsuite/pass/src/fancy-lib/foo.rs
diff --git a/src/librustpkg/testsuite/pass/src/fancy-lib/pkg.rs b/src/librustpkg/testsuite/pass/src/fancy-lib/pkg.rs
index be3c68d731b..eeaa0f68ed5 100644
--- a/src/librustpkg/testsuite/pass/src/fancy-lib/pkg.rs
+++ b/src/librustpkg/testsuite/pass/src/fancy-lib/pkg.rs
@@ -11,13 +11,18 @@
 use core::run;
 
 pub fn main() {
-    let cwd = os::getcwd();
-    debug!("cwd = %s", cwd.to_str());
-    let file = io::file_writer(&Path(~"fancy-lib/build/generated.rs"),
+    use core::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR};
+
+    let out_path = Path(~"build/fancy_lib");
+    if !os::path_exists(&out_path) {
+        assert!(os::make_dir(&out_path, (S_IRUSR | S_IWUSR | S_IXUSR) as i32));
+    }
+
+    let file = io::file_writer(&out_path.push("generated.rs"),
                                [io::Create]).get();
     file.write_str("pub fn wheeeee() { for [1, 2, 3].each() |_| { assert!(true); } }");
 
     // now compile the crate itself
-    run::run_program("rustc", ~[~"fancy-lib/fancy-lib.rs", ~"--lib",
-                                ~"-o", ~"fancy-lib/build/fancy_lib"]);
+    run::run_program("rustc", ~[~"src/fancy-lib/fancy-lib.rs", ~"--lib",
+                                ~"-o", out_path.push(~"fancy_lib").to_str()]);
 }
\ No newline at end of file
diff --git a/src/librustpkg/testsuite/pass/src/hello-world/src/main.rs b/src/librustpkg/testsuite/pass/src/hello-world/main.rs
index 2ef387d9620..2ef387d9620 100644
--- a/src/librustpkg/testsuite/pass/src/hello-world/src/main.rs
+++ b/src/librustpkg/testsuite/pass/src/hello-world/main.rs
diff --git a/src/librustpkg/testsuite/pass/src/install-paths/src/bench.rs b/src/librustpkg/testsuite/pass/src/install-paths/bench.rs
index e1641ccf074..e1641ccf074 100644
--- a/src/librustpkg/testsuite/pass/src/install-paths/src/bench.rs
+++ b/src/librustpkg/testsuite/pass/src/install-paths/bench.rs
diff --git a/src/librustpkg/testsuite/pass/src/install-paths/src/lib.rs b/src/librustpkg/testsuite/pass/src/install-paths/lib.rs
index baf90446f7a..baf90446f7a 100644
--- a/src/librustpkg/testsuite/pass/src/install-paths/src/lib.rs
+++ b/src/librustpkg/testsuite/pass/src/install-paths/lib.rs
diff --git a/src/librustpkg/testsuite/pass/src/install-paths/src/main.rs b/src/librustpkg/testsuite/pass/src/install-paths/main.rs
index 37e606dcb1a..37e606dcb1a 100644
--- a/src/librustpkg/testsuite/pass/src/install-paths/src/main.rs
+++ b/src/librustpkg/testsuite/pass/src/install-paths/main.rs
diff --git a/src/librustpkg/testsuite/pass/src/install-paths/src/test.rs b/src/librustpkg/testsuite/pass/src/install-paths/test.rs
index acfae9e04fb..acfae9e04fb 100644
--- a/src/librustpkg/testsuite/pass/src/install-paths/src/test.rs
+++ b/src/librustpkg/testsuite/pass/src/install-paths/test.rs