From 0d3ab673aae771e194bad2ba74e38faddf938704 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Thu, 11 Feb 2021 01:56:59 +0300 Subject: [PATCH] run-tests: fix JUnit counts In 19680f886f, I forgot about my own TODO. At least, now I understand what this line was about :P --- run-tests.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) { -- 2.50.1