Run tests concurrently.

Spin up one worker thread per cpu, and run filetests on all of them. Use
a reorder buffer in Runner to make sure results are still reported in
order.

Individual test files given as command line arguments are still run
synchronously for easier debugging. Only directories are run on worker
threads. The recursive directory traversal is still happening on the
main thread.

Use a heartbeat thread to send ticks on the reply channel every second,
and use the ticks to detect tests that are stuck. When
Receiver::recv_timeout() is stabilized, we can probably get rid of the
heartbeat thread.

Catch panics on the worker threads and report them as test failures.
This commit is contained in:
Jakob Stoklund Olesen
2016-09-17 09:51:06 -07:00
parent 356e05d225
commit 1c1ae524aa
6 changed files with 267 additions and 30 deletions

View File

@@ -4,6 +4,7 @@ extern crate cton_reader;
extern crate docopt;
extern crate rustc_serialize;
extern crate filecheck;
extern crate num_cpus;
use cretonne::VERSION;
use docopt::Docopt;