Display the name of the test being waited for before the result is in
So the test runner displays the name of the test, then waits for it to finish, then displays the result. It worked this way before things were parallelized and it's just much friendlier this way.
This commit is contained in:
@@ -121,8 +121,10 @@ fn run_tests_console_(opts: &test_opts, tests: &test_desc[],
|
|||||||
st.total = ivec::len(filtered_tests);
|
st.total = ivec::len(filtered_tests);
|
||||||
st.out.write_line(#fmt("\nrunning %u tests", st.total));
|
st.out.write_line(#fmt("\nrunning %u tests", st.total));
|
||||||
}
|
}
|
||||||
te_result(test, result) {
|
te_wait(test) {
|
||||||
st.out.write_str(#fmt("test %s ... ", test.name));
|
st.out.write_str(#fmt("test %s ... ", test.name));
|
||||||
|
}
|
||||||
|
te_result(test, result) {
|
||||||
alt result {
|
alt result {
|
||||||
tr_ok. {
|
tr_ok. {
|
||||||
st.passed += 1u;
|
st.passed += 1u;
|
||||||
@@ -209,6 +211,7 @@ fn use_color() -> bool {
|
|||||||
|
|
||||||
tag testevent {
|
tag testevent {
|
||||||
te_filtered(test_desc[]);
|
te_filtered(test_desc[]);
|
||||||
|
te_wait(test_desc);
|
||||||
te_result(test_desc, test_result);
|
te_result(test_desc, test_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,6 +239,7 @@ fn run_tests(opts: &test_opts, tests: &test_desc[],
|
|||||||
}
|
}
|
||||||
|
|
||||||
let future = futures.(0);
|
let future = futures.(0);
|
||||||
|
callback(te_wait(future.test));
|
||||||
let result = future.wait();
|
let result = future.wait();
|
||||||
callback(te_result(future.test, result));
|
callback(te_result(future.test, result));
|
||||||
futures = ivec::slice(futures, 1u, ivec::len(futures));
|
futures = ivec::slice(futures, 1u, ivec::len(futures));
|
||||||
|
|||||||
Reference in New Issue
Block a user