From: Max Semenik Date: Wed, 10 Feb 2021 22:56:59 +0000 (+0300) Subject: run-tests: fix JUnit counts X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d3ab673aae771e194bad2ba74e38faddf938704;p=php run-tests: fix JUnit counts In 19680f886f, I forgot about my own TODO. At least, now I understand what this line was about :P --- 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) {