Skip to content

Commit 67b8f8b

Browse files
committed
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.
1 parent 1702b85 commit 67b8f8b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib/test.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,10 @@ fn run_tests_console_(opts: &test_opts, tests: &test_desc[],
121121
st.total = ivec::len(filtered_tests);
122122
st.out.write_line(#fmt("\nrunning %u tests", st.total));
123123
}
124-
te_result(test, result) {
124+
te_wait(test) {
125125
st.out.write_str(#fmt("test %s ... ", test.name));
126+
}
127+
te_result(test, result) {
126128
alt result {
127129
tr_ok. {
128130
st.passed += 1u;
@@ -209,6 +211,7 @@ fn use_color() -> bool {
209211

210212
tag testevent {
211213
te_filtered(test_desc[]);
214+
te_wait(test_desc);
212215
te_result(test_desc, test_result);
213216
}
214217

@@ -236,6 +239,7 @@ fn run_tests(opts: &test_opts, tests: &test_desc[],
236239
}
237240

238241
let future = futures.(0);
242+
callback(te_wait(future.test));
239243
let result = future.wait();
240244
callback(te_result(future.test, result));
241245
futures = ivec::slice(futures, 1u, ivec::len(futures));

0 commit comments

Comments
 (0)