Skip to content

Commit

Permalink
run-tests: fix JUnit counts
Browse files Browse the repository at this point in the history
In 19680f8, I forgot about my own TODO. At least, now I understand what
this line was about :P
  • Loading branch information
MaxSem authored and nikic committed Feb 11, 2021
1 parent e396506 commit 0d3ab67
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion run-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ function run_worker(): void
"type" => "tests_finished",
"junit" => $junit->isEnabled() ? $junit : null,
]);
//junit_init(); TODO is this needed?
$junit->clear();
break;
default:
send_message($workerSock, [
Expand Down Expand Up @@ -3468,6 +3468,12 @@ public function isEnabled(): bool
return $this->enabled;
}

public function clear(): void
{
$this->rootSuite = self::EMPTY_SUITE + ['name' => 'php'];
$this->suites = [];
}

public function saveXML(): void
{
if (!$this->enabled) {
Expand Down

0 comments on commit 0d3ab67

Please sign in to comment.