[JIRA] (JENKINS-58159) 0 warnings found when parsing from file using IAR parser

9 views
Skip to first unread message

jonathand131@gmail.com (JIRA)

unread,
Jun 24, 2019, 5:03:02 AM6/24/19
to jenkinsc...@googlegroups.com
Jonathan Delizy created an issue
 
Jenkins / Bug JENKINS-58159
0 warnings found when parsing from file using IAR parser
Issue Type: Bug Bug
Assignee: Ulli Hafner
Attachments: Debug_3Nm_iar_build.log
Components: warnings-ng-plugin
Created: 2019-06-24 09:02
Environment: Warnings Next Generation Plugin 5.1.0
Jenkins 2.176.1
Priority: Major Major
Reporter: Jonathan Delizy

Hello

When using the IAR parser with a pattern to parse a log file instead of the console, the parser founds 0 warnings whereas there is plenty.

Using the same parser on console founds the warnings but is useless to me since it mixes warnings from all my parallels tasks in my Jenkins pipeline.

Log file is in attachement.

Part of pipeline code:

node ('IAR_8_32_ARM') {
    try {
        deleteDir()
        unstash name: 'SOURCES'
        bat label: "IAR build", script: """
                set PATH=%PATH%;%IAR_8_32_ARM%\\common\\bin
                set /a NB_PROCESS=%NUMBER_OF_PROCESSORS%*2
                powershell "& '%IAR_8_32_ARM%\\common\\bin\\IarBuild.exe' CODE\\IDE\\IAR_ARM\\SIM145.ewp -build '${axisIarConfigurationValue}' -log info -parallel %NB_PROCESS% -varfile 'CODE\\IDE\\IAR_ARM\\SIM145_${axisMotorTorqueValue}.custom_argvars' *>&1 | Tee-Object -FilePath '${axisIarConfigurationValue}_${axisMotorTorqueValue}_iar_build.log'"
                """
        archiveArtifacts allowEmptyArchive: false, artifacts: "${axisIarConfigurationValue}_${axisMotorTorqueValue}_iar_build.log, CODE/IDE/IAR_ARM/${axisIarConfigurationValue}/Exe/**, CODE/IDE/IAR_ARM/${axisIarConfigurationValue}/List/**, CODE/IDE/IAR_ARM/*", caseSensitive: true, defaultExcludes: true, fingerprint: false, onlyIfSuccessful: false 
    } catch(exp) {
        throw exp
    } finally {
        recordIssues enabledForFailure: true, tools: [iar(id: "${axisIarConfigurationValue}_${axisMotorTorqueValue}", name: "${axisIarConfigurationValue}/${axisMotorTorqueValue}", pattern: "${axisIarConfigurationValue}_${axisMotorTorqueValue}_iar_build.log", reportEncoding: "CP1250")], sourceCodeEncoding: "CP1250"
        deleteDir()
    }
}

Note: I use PowerShell to "tee" the IAR output to both console and the log file. The tee step doesn't work for me. Seems related to PR #62.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jonathand131@gmail.com (JIRA)

unread,
Jun 24, 2019, 8:09:03 AM6/24/19
to jenkinsc...@googlegroups.com
Jonathan Delizy updated an issue
Change By: Jonathan Delizy
Hello

When using the IAR parser with a pattern to parse a log file instead of the console, the parser founds 0 warnings whereas there is plenty.

Using the same parser on console founds the warnings but is useless to me since it mixes warnings from all my parallels tasks in my Jenkins pipeline.

IAR Log file is in attachement.

Part of
build log:
{noformat}
10:32:46  Skipping issues blame since Git is the only supported SCM up to now.
10:32:46  [Debug/3Nm] Searching for all files in 'D:\Jenkins_SIMU\workspace\SIM145_SIM145_BuildMulti_trunk' that match the pattern 'Debug_3Nm_iar_build.log'
10:32:46  [Debug/3Nm] -> found 1 file
10:32:46  [Debug/3Nm] Successfully parsed file D:\Jenkins_SIMU\workspace\SIM145_SIM145_BuildMulti_trunk\Debug_3Nm_iar_build.log
10:32:46  [Debug/3Nm] -> found 0 issues (skipped 0 duplicates)
10:32:46  [Debug/3Nm] Attaching ResultAction with ID 'Debug_3Nm' to run 'SIM145/SIM145_BuildMulti/trunk #300'.
{noformat}

Part of
pipeline code:
{code}

node ('IAR_8_32_ARM') {
    try {
        deleteDir()
        unstash name: 'SOURCES'
        bat label: "IAR build", script: """
                set PATH=%PATH%;%IAR_8_32_ARM%\\common\\bin
                set /a NB_PROCESS=%NUMBER_OF_PROCESSORS%*2
                powershell "& '%IAR_8_32_ARM%\\common\\bin\\IarBuild.exe' CODE\\IDE\\IAR_ARM\\SIM145.ewp -build '${axisIarConfigurationValue}' -log info -parallel %NB_PROCESS% -varfile 'CODE\\IDE\\IAR_ARM\\SIM145_${axisMotorTorqueValue}.custom_argvars' *>&1 | Tee-Object -FilePath '${axisIarConfigurationValue}_${axisMotorTorqueValue}_iar_build.log'"
                """
        archiveArtifacts allowEmptyArchive: false, artifacts: "${axisIarConfigurationValue}_${axisMotorTorqueValue}_iar_build.log, CODE/IDE/IAR_ARM/${axisIarConfigurationValue}/Exe/**, CODE/IDE/IAR_ARM/${axisIarConfigurationValue}/List/**, CODE/IDE/IAR_ARM/*", caseSensitive: true, defaultExcludes: true, fingerprint: false, onlyIfSuccessful: false
    } catch(exp) {
        throw exp
    } finally {
        recordIssues enabledForFailure: true, tools: [iar(id: "${axisIarConfigurationValue}_${axisMotorTorqueValue}", name: "${axisIarConfigurationValue}/${axisMotorTorqueValue}", pattern: "${axisIarConfigurationValue}_${axisMotorTorqueValue}_iar_build.log", reportEncoding: "CP1250")], sourceCodeEncoding: "CP1250"
        deleteDir()
    }
}
{code}

Note: I use PowerShell to "tee" the IAR output to both console and the log file. The {{tee}} step doesn't work for me. Seems related to PR [#62|https://github.com/jenkinsci/pipeline-utility-steps-plugin/pull/62].

ullrich.hafner@gmail.com (JIRA)

unread,
Jul 18, 2019, 10:29:02 AM7/18/19
to jenkinsc...@googlegroups.com
Ulli Hafner resolved as Not A Defect
 

Seems that this is an encoding problem, your shell is exporting with UTF_16LE.

See https://github.com/jenkinsci/analysis-model/commit/9c551b1ad555f3d482f10aa4ec9d56dcaa843ae2.

Change By: Ulli Hafner
Status: Open Resolved
Resolution: Not A Defect

jonathand131@gmail.com (JIRA)

unread,
Jul 18, 2019, 11:09:02 AM7/18/19
to jenkinsc...@googlegroups.com
Jonathan Delizy commented on Bug JENKINS-58159
 
Re: 0 warnings found when parsing from file using IAR parser

Ulli Hafner You're right, changing the reportEncoding to UTF_16LE fixed it.
Thanks a lot for your help.

ullrich.hafner@gmail.com (JIRA)

unread,
Jul 28, 2019, 6:27:03 PM7/28/19
to jenkinsc...@googlegroups.com
Ulli Hafner reopened an issue
 
Change By: Ulli Hafner
Resolution: Not A Defect
Status: Resolved Reopened
Reply all
Reply to author
Forward
0 new messages