From c4821dd7b1612fcd1d3a6173df3c3b1256373186 Mon Sep 17 00:00:00 2001 From: Dima Date: Mon, 2 Sep 2024 18:05:02 +0300 Subject: [PATCH] diagnostic message and fixes --- src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy b/src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy index 225ea7ac..ef243956 100644 --- a/src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy +++ b/src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy @@ -86,8 +86,13 @@ class Yaxunit implements Serializable { def newDbgsPids = getPIDs("dbgs") def newCoverage41CPids = getPIDs("Coverage41C") - env.YAXUNIT_DBGS_PIDS = (newDbgsPids - currentDbgsPids).join(" ") - env.YAXUNIT_COVERAGE41C_PIDS = (newCoverage41CPids - currentCoverage41CPids).join(" ") + newDbgsPids.removeAll(currentDbgsPids) + newCoverage41CPids.removeAll(currentCoverage41CPids) + + env.YAXUNIT_DBGS_PIDS = newDbgsPids.join(" ") + steps.echo("YAXUNIT_DBGS_PIDS = $env.YAXUNIT_DBGS_PIDS") + env.YAXUNIT_COVERAGE41C_PIDS = newCoverage41CPids.join(" ") + steps.echo("YAXUNIT_COVERAGE41C_PIDS = $env.YAXUNIT_COVERAGE41C_PIDS") } @@ -137,6 +142,6 @@ class Yaxunit implements Serializable { } else { pids = steps.bat("chcp 65001 > nul \nfor /f \"tokens=2\" %a in ('tasklist ^| findstr $name') do @echo %a", false, true, 'UTF-8') } - return pids.split('\n').collect{it as String} + return pids.split('\n') } }