Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58159

Wrong number of warnings on Windows

    Details

    • Similar Issues:

      Description

      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:

      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'.
      

      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.

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment -

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

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

          Show
          drulli Ulli Hafner added a comment - Seems that this is an encoding problem, your shell is exporting with UTF_16LE . See https://github.com/jenkinsci/analysis-model/commit/9c551b1ad555f3d482f10aa4ec9d56dcaa843ae2 .
          Hide
          jonathand131 Jonathan Delizy added a comment -

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

          Show
          jonathand131 Jonathan Delizy added a comment - Ulli Hafner You're right, changing the reportEncoding to UTF_16LE fixed it. Thanks a lot for your help.
          Hide
          drulli Ulli Hafner added a comment -

          I reopen the issue, since my test seems to work on Unix but not on Windows. The parser finds warnings on Windows when using UTF_16LE, however the number is not the same as the expected one (on Unix), see https://ci.jenkins.io/job/Plugins/job/analysis-model/job/master/666/

          Did you also notify that behavior?

          Show
          drulli Ulli Hafner added a comment - I reopen the issue, since my test seems to work on Unix but not on Windows. The parser finds warnings on Windows when using UTF_16LE , however the number is not the same as the expected one (on Unix), see https://ci.jenkins.io/job/Plugins/job/analysis-model/job/master/666/ Did you also notify that behavior?
          Hide
          jonathand131 Jonathan Delizy added a comment -

          Hi, checked my builds: IAR reports a total of 45 warnings, the log parser reports 42 warnings + 3 duplicates so this seems correct.

          Run is done on Windows with Warnings NG plugin 5.3.0 and Jenkins 2.176.2

          Show
          jonathand131 Jonathan Delizy added a comment - Hi, checked my builds: IAR reports a total of 45 warnings, the log parser reports 42 warnings + 3 duplicates so this seems correct. Run is done on Windows with Warnings NG plugin 5.3.0 and Jenkins 2.176.2
          Hide
          drulli Ulli Hafner added a comment -

          In order to inspect the test failure a Windows setup is required.

          Show
          drulli Ulli Hafner added a comment - In order to inspect the test failure a Windows setup is required.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              jonathand131 Jonathan Delizy
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: