Do not take reports creations into account for test duration.

This commit is contained in:
Jean-Christophe Amiel 2024-05-20 13:15:16 +02:00
parent 1d49ba1c72
commit cfcd26cc64
No known key found for this signature in database
GPG Key ID: 07FF11CFD55356CC

View File

@ -97,12 +97,14 @@ fn main() {
Err(CliError::Runtime(msg)) => exit_with_error(&msg, EXIT_ERROR_RUNTIME, &base_logger),
};
// Compute duration of the test here to not take reports writings into acccount.
let duration = start.elapsed().as_millis();
// Write HTML, JUnit, TAP reports on disk.
let ret = export_results(&runs, &opts, &base_logger);
unwrap_or_exit(ret, EXIT_ERROR_UNDEFINED, &base_logger);
if opts.test {
let duration = start.elapsed().as_millis();
let summary = get_summary(&runs, duration);
base_logger.info(summary.as_str());
}