Skip to content

Commit 0d3ab67

Browse files
MaxSemnikic
authored andcommitted
run-tests: fix JUnit counts
In 19680f8, I forgot about my own TODO. At least, now I understand what this line was about :P
1 parent e396506 commit 0d3ab67

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

run-tests.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,7 @@ function run_worker(): void
17641764
"type" => "tests_finished",
17651765
"junit" => $junit->isEnabled() ? $junit : null,
17661766
]);
1767-
//junit_init(); TODO is this needed?
1767+
$junit->clear();
17681768
break;
17691769
default:
17701770
send_message($workerSock, [
@@ -3468,6 +3468,12 @@ public function isEnabled(): bool
34683468
return $this->enabled;
34693469
}
34703470

3471+
public function clear(): void
3472+
{
3473+
$this->rootSuite = self::EMPTY_SUITE + ['name' => 'php'];
3474+
$this->suites = [];
3475+
}
3476+
34713477
public function saveXML(): void
34723478
{
34733479
if (!$this->enabled) {

0 commit comments

Comments
 (0)