diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2015-02-18 23:50:21 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2015-02-18 23:50:21 +1100 |
| commit | dfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5 (patch) | |
| tree | e9c32f2e58b3462a23dd9c472d2f236640b78811 /src/libtest | |
| parent | 6c065fc8cb036785f61ff03e05c1563cbb2dd081 (diff) | |
| parent | 47f91a9484eceef10536d4caac6ef578cd254567 (diff) | |
| download | rust-dfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5.tar.gz rust-dfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5.zip | |
Manual merge of #22475 - alexcrichton:rollup, r=alexcrichton
One windows bot failed spuriously.
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/lib.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 860ce209d45..2cb30ad9804 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -39,8 +39,8 @@ #![feature(env)] #![feature(hash)] #![feature(int_uint)] -#![feature(io)] -#![feature(path)] +#![feature(old_io)] +#![feature(old_path)] #![feature(rustc_private)] #![feature(staged_api)] #![feature(std_misc)] @@ -75,7 +75,7 @@ use std::iter::repeat; use std::num::{Float, Int}; use std::env; use std::sync::mpsc::{channel, Sender}; -use std::thread::{self, Thread}; +use std::thread; use std::thunk::{Thunk, Invoke}; use std::time::Duration; @@ -154,7 +154,7 @@ pub enum TestFn { StaticTestFn(fn()), StaticBenchFn(fn(&mut Bencher)), StaticMetricFn(fn(&mut MetricMap)), - DynTestFn(Thunk), + DynTestFn(Thunk<'static>), DynMetricFn(Box<for<'a> Invoke<&'a mut MetricMap>+'static>), DynBenchFn(Box<TDynBenchFn+'static>) } @@ -878,8 +878,8 @@ pub fn run_test(opts: &TestOpts, fn run_test_inner(desc: TestDesc, monitor_ch: Sender<MonitorMsg>, nocapture: bool, - testfn: Thunk) { - Thread::spawn(move || { + testfn: Thunk<'static>) { + thread::spawn(move || { let (tx, rx) = channel(); let mut reader = ChanReader::new(rx); let stdout = ChanWriter::new(tx.clone()); @@ -895,7 +895,7 @@ pub fn run_test(opts: &TestOpts, cfg = cfg.stderr(box stderr as Box<Writer + Send>); } - let result_guard = cfg.scoped(move || { testfn.invoke(()) }); + let result_guard = cfg.spawn(move || { testfn.invoke(()) }).unwrap(); let stdout = reader.read_to_end().unwrap().into_iter().collect(); let test_result = calc_result(&desc, result_guard.join()); monitor_ch.send((desc.clone(), test_result, stdout)).unwrap(); |
