about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run-make/c-dynamic-dylib/Makefile16
-rw-r--r--tests/run-make/c-dynamic-dylib/rmake.rs17
-rw-r--r--tests/run-make/c-dynamic-rlib/rmake.rs8
3 files changed, 19 insertions, 22 deletions
diff --git a/tests/run-make/c-dynamic-dylib/Makefile b/tests/run-make/c-dynamic-dylib/Makefile
deleted file mode 100644
index 39561b28222..00000000000
--- a/tests/run-make/c-dynamic-dylib/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# This test checks that dynamic Rust linking with C does not encounter any errors, with dynamic dependencies given preference over static.
-# See https://github.com/rust-lang/rust/issues/10434
-
-# ignore-cross-compile
-include ../tools.mk
-
-# ignore-apple
-#
-# This hits an assertion in the linker on older versions of osx apparently
-
-all: $(call DYLIB,cfoo)
-	$(RUSTC) foo.rs -C prefer-dynamic
-	$(RUSTC) bar.rs
-	$(call RUN,bar)
-	$(call REMOVE_DYLIBS,cfoo)
-	$(call FAIL,bar)
diff --git a/tests/run-make/c-dynamic-dylib/rmake.rs b/tests/run-make/c-dynamic-dylib/rmake.rs
new file mode 100644
index 00000000000..65b5e02abf0
--- /dev/null
+++ b/tests/run-make/c-dynamic-dylib/rmake.rs
@@ -0,0 +1,17 @@
+// This test checks that dynamic Rust linking with C does not encounter any errors in both
+// compilation and execution, with dynamic dependencies given preference over static.
+// See https://github.com/rust-lang/rust/issues/10434
+
+//@ ignore-cross-compile
+// Reason: the compiled binary is executed
+
+use run_make_support::{build_native_dynamic_lib, dynamic_lib_name, rfs, run, run_fail, rustc};
+
+fn main() {
+    build_native_dynamic_lib("cfoo");
+    rustc().input("foo.rs").arg("-Cprefer-dynamic").run();
+    rustc().input("bar.rs").run();
+    run("bar");
+    rfs::remove_file(dynamic_lib_name("cfoo"));
+    run_fail("bar");
+}
diff --git a/tests/run-make/c-dynamic-rlib/rmake.rs b/tests/run-make/c-dynamic-rlib/rmake.rs
index c48b1edee9e..b59887bbdd6 100644
--- a/tests/run-make/c-dynamic-rlib/rmake.rs
+++ b/tests/run-make/c-dynamic-rlib/rmake.rs
@@ -6,17 +6,13 @@
 //@ ignore-cross-compile
 // Reason: the compiled binary is executed
 
-//FIXME(Oneirical): test on apple because older versions of osx are failing apparently
-
-use run_make_support::{
-    build_native_dynamic_lib, dynamic_lib_name, fs_wrapper, run, run_fail, rustc,
-};
+use run_make_support::{build_native_dynamic_lib, dynamic_lib_name, rfs, run, run_fail, rustc};
 
 fn main() {
     build_native_dynamic_lib("cfoo");
     rustc().input("foo.rs").run();
     rustc().input("bar.rs").run();
     run("bar");
-    fs_wrapper::remove_file(dynamic_lib_name("cfoo"));
+    rfs::remove_file(dynamic_lib_name("cfoo"));
     run_fail("bar");
 }