Skip to content

Commit

Permalink
add logging in findDbgs
Browse files Browse the repository at this point in the history
  • Loading branch information
ovcharenko-di committed Dec 12, 2024
1 parent bbd5238 commit 408bc1e
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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

}

Expand Down

0 comments on commit 408bc1e

Please sign in to comment.