libcore: Use 4x the number of scheduler threads for testing
An arbitrary number. I've done no measurements but it's intended to overcome the effects of tasks randomly being scheduled to threads and no work stealing. If scheduler threads == 1 then we just use a single test task.
This commit is contained in:
parent
928e55815c
commit
6d4884d983
@ -187,7 +187,6 @@ fn make_test_closure(cx: cx, testfile: str) -> test::test_fn {
|
||||
fn run_test_task(config: common::config,
|
||||
procsrv_chan: procsrv::reqchan,
|
||||
testfile: str) {
|
||||
test::configure_test_task();
|
||||
|
||||
let procsrv = procsrv::from_chan(procsrv_chan);
|
||||
let cx = {config: config, procsrv: procsrv};
|
||||
|
@ -227,7 +227,11 @@ fn run_tests(opts: test_opts, tests: [test_desc],
|
||||
}
|
||||
}
|
||||
|
||||
fn get_concurrency() -> uint { rustrt::sched_threads() }
|
||||
fn get_concurrency() -> uint {
|
||||
let threads = rustrt::sched_threads();
|
||||
if threads == 1u { 1u }
|
||||
else { threads * 4u }
|
||||
}
|
||||
|
||||
fn filter_tests(opts: test_opts,
|
||||
tests: [test_desc]) -> [test_desc] {
|
||||
|
Loading…
Reference in New Issue
Block a user