Skip to content
This repository was archived by the owner on May 20, 2020. It is now read-only.

Commit ca8ecd4

Browse files
committed
provide better output
1 parent 53ff5dc commit ca8ecd4

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

src/lib.rs

+23-4
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,29 @@ pub fn test(config: &Config) -> Result<()> {
231231
let crate_name = krate.id.split("::").next().unwrap();
232232

233233
let location = config.output_path().join("tests");
234-
let tests = test::find_tests(&docs);
235-
test::save_tests(&tests, &location, &crate_name)?;
236-
let binary = test::compile_tests(&config, &location)?;
237-
test::execute_tests(&binary)?;
234+
let tests = {
235+
let task = config.ui.start_task("Finding tests");
236+
task.report("In Progress");
237+
test::find_tests(&docs)
238+
};
239+
240+
{
241+
let task = config.ui.start_task("Saving tests");
242+
task.report("In Progress");
243+
test::save_tests(&tests, &location, &crate_name)?;
244+
}
245+
246+
let binary = {
247+
let task = config.ui.start_task("Compiling tests");
248+
task.report("In Progress");
249+
test::compile_tests(&config, &location)?
250+
};
251+
252+
{
253+
let task = config.ui.start_task("Executing tests");
254+
task.report("In Progress");
255+
test::execute_tests(&binary)?;
256+
}
238257

239258
Ok(())
240259
}

0 commit comments

Comments
 (0)