summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorMax Semenik <maxsem.wiki@gmail.com>2021-02-11 01:56:59 +0300
committerNikita Popov <nikita.ppv@gmail.com>2021-02-11 09:47:56 +0100
commit0d3ab673aae771e194bad2ba74e38faddf938704 (patch)
tree3108f3e0af9d0eec2edef35cbf0782b18340d10f /run-tests.php
parente396506cd6bf1afdbbfc716a692a2055cc7d2e9c (diff)
downloadphp-git-0d3ab673aae771e194bad2ba74e38faddf938704.tar.gz
run-tests: fix JUnit counts
In 19680f886f, I forgot about my own TODO. At least, now I understand what this line was about :P
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/run-tests.php b/run-tests.php
index 57751309c4..fb270f0adf 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -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, [
@@ -3468,6 +3468,12 @@ class JUnit
return $this->enabled;
}
+ public function clear(): void
+ {
+ $this->rootSuite = self::EMPTY_SUITE + ['name' => 'php'];
+ $this->suites = [];
+ }
+
public function saveXML(): void
{
if (!$this->enabled) {