about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/lib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 433400cc9f0..7d734469b12 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -81,6 +81,16 @@
 #[cfg(stage0)]
 pub use vec_ng = vec;
 
+// Run tests with libgreen instead of libnative.
+//
+// FIXME: This egregiously hacks around starting the test runner in a different
+//        threading mode than the default by reaching into the auto-generated
+//        '__test' module.
+#[cfg(test)] #[start]
+fn start(argc: int, argv: **u8) -> int {
+    green::start(argc, argv, __test::main)
+}
+
 pub mod macros;
 
 mod rtdeps;