Skip to content

Commit

Permalink
Print package test count right before printing package tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Dec 11, 2024
1 parent 6add1d8 commit a6ca811
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tooling/nargo_cli/src/cli/test_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ impl<'a> TestRunner<'a> {
tests.extend(package_tests);
}

// If there were no compile errors we'll run them all. Here we show how many there are per package.
for (package_name, test_count) in &test_count_per_package {
let plural = if *test_count == 1 { "" } else { "s" };
println!("[{package_name}] Running {test_count} test function{plural}");
}

// Now run all tests in parallel, but show output for each package sequentially
let tests_count = tests.len();
let all_passed = self.run_all_tests(tests, &test_count_per_package);
Expand Down Expand Up @@ -213,6 +207,9 @@ impl<'a> TestRunner<'a> {
// We'll buffer those here and show them all at once when we get to those packages.
let mut buffer: HashMap<String, Vec<TestResult>> = HashMap::new();
for (package_name, test_count) in test_count_per_package {
let plural = if *test_count == 1 { "" } else { "s" };
println!("[{package_name}] Running {test_count} test function{plural}");

let mut test_report = Vec::new();

// How many tests are left to receive for this package
Expand Down

0 comments on commit a6ca811

Please sign in to comment.