From 408bc1e05b9af7b17eff0f8952318477b2fef7db Mon Sep 17 00:00:00 2001 From: Dima Date: Thu, 12 Dec 2024 16:50:30 +0300 Subject: [PATCH] add logging in findDbgs --- .../library/utils/CoverageUtils.groovy | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy b/src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy index a8a8d787..5334c10a 100644 --- a/src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy +++ b/src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy @@ -79,19 +79,24 @@ class CoverageUtils { static String findDbgs(IStepExecutor steps, JobConfiguration config) { String dbgsPath = config.coverageOptions.dbgsPath - if (dbgsPath.isEmpty()) { - def osResourcePath = steps.libraryResource "dbgs.os" - final osResultPath = "build/dbgs.os" - steps.writeFile(osResultPath, osResourcePath, 'UTF-8') - - dbgsPath = steps.cmd("oscript ${osResultPath} ${config.v8version}", false, true) + if (!dbgsPath.isEmpty()) { + Logger.println("Using dbgsPath from config: $dbgsPath") + return dbgsPath.strip() } + def osResourcePath = steps.libraryResource "dbgs.os" + final osResultPath = "build/dbgs.os" + steps.writeFile(osResultPath, osResourcePath, 'UTF-8') + + dbgsPath = steps.cmd("oscript ${osResultPath} ${config.v8version}", false, true) + dbgsPath = dbgsPath.strip() + if (dbgsPath.isEmpty()) { steps.error("Не удалось найти путь к dbgs") } - return dbgsPath.strip() + Logger.println("Found dbgs: ${dbgsPath}") + return dbgsPath }