parent
ed204257a0
commit
b89e1c000e
25 changed files with 1083 additions and 1024 deletions
|
|
@ -54,10 +54,10 @@ pub fn run(lib_path: &str,
|
|||
in_fd: None,
|
||||
out_fd: None,
|
||||
err_fd: None
|
||||
});
|
||||
}).unwrap();
|
||||
|
||||
for input in input.iter() {
|
||||
proc.input().write_str(*input);
|
||||
proc.input().write(input.as_bytes());
|
||||
}
|
||||
let output = proc.finish_with_output();
|
||||
|
||||
|
|
|
|||
|
|
@ -20,41 +20,16 @@ use procsrv;
|
|||
use util;
|
||||
use util::logv;
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::io;
|
||||
use std::os;
|
||||
use std::str;
|
||||
use std::task::{spawn_sched, SingleThreaded};
|
||||
use std::vec;
|
||||
use std::unstable::running_on_valgrind;
|
||||
|
||||
use extra::test::MetricMap;
|
||||
|
||||
pub fn run(config: config, testfile: ~str) {
|
||||
let config = Cell::new(config);
|
||||
let testfile = Cell::new(testfile);
|
||||
// FIXME #6436: Creating another thread to run the test because this
|
||||
// is going to call waitpid. The new scheduler has some strange
|
||||
// interaction between the blocking tasks and 'friend' schedulers
|
||||
// that destroys parallelism if we let normal schedulers block.
|
||||
// It should be possible to remove this spawn once std::run is
|
||||
// rewritten to be non-blocking.
|
||||
//
|
||||
// We do _not_ create another thread if we're running on V because
|
||||
// it serializes all threads anyways.
|
||||
if running_on_valgrind() {
|
||||
let config = config.take();
|
||||
let testfile = testfile.take();
|
||||
let mut _mm = MetricMap::new();
|
||||
run_metrics(config, testfile, &mut _mm);
|
||||
} else {
|
||||
do spawn_sched(SingleThreaded) {
|
||||
let config = config.take();
|
||||
let testfile = testfile.take();
|
||||
let mut _mm = MetricMap::new();
|
||||
run_metrics(config, testfile, &mut _mm);
|
||||
}
|
||||
}
|
||||
let mut _mm = MetricMap::new();
|
||||
run_metrics(config, testfile, &mut _mm);
|
||||
}
|
||||
|
||||
pub fn run_metrics(config: config, testfile: ~str, mm: &mut MetricMap) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue