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

Warnings from gcc-4 build output being picked up when using Warnings MSBuild filter

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-plugin
    • None
    • Jenkins system is Ubuntu 12.04 Server

      I build for 2 platforms serially on 2 different build VMs and have the output go to the same common log file.

      I use MSBuild to parse that log file for the Win MSBuild related warnings and gcc-4 for the MacOS gcc warnings.

      Currently, the MSBuild warning filter is picking up this output from the MacOS build (note the forward slashes among other evidence that show this is not on Windows):

      ld: warning: object file compiled with -mlong-branch which is no longer needed. To remove this warning, recompile without -mlong-branch: /usr/lib/gcc/powerpc-apple-darwin10/4.0.1/crt2.o creating bin/paqa_devs
      ld: warning: object file compiled with -mlong-branch which is no longer needed. To remove this warning, recompile without -mlong-branch: /usr/lib/gcc/powerpc-apple-darwin10/4.0.1/crt2.o creating bin/patest1

      I think the regex needs to be improved for MSBuild to ignore non-Windows output or perhaps the format of the error code (in this case "ld:") should be more strict so as not to allow invalid MSBuild codes (I can't imagine that ld: is a valid MSBuild code).

      What this ends up doing is greatly tilting our MSBuild warnings count and including unusable information in the MSBuild warnings result page.

          [JENKINS-20544] Warnings from gcc-4 build output being picked up when using Warnings MSBuild filter

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/test/java/hudson/plugins/warnings/parser/MsBuildParserTest.java
          src/test/resources/hudson/plugins/warnings/parser/issue20544.txt
          http://jenkins-ci.org/commit/warnings-plugin/c7cd170d486979d9c49bfa1085d8198062b3a067
          Log:
          [ JENKINS-20544] Added a test case.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/test/java/hudson/plugins/warnings/parser/MsBuildParserTest.java src/test/resources/hudson/plugins/warnings/parser/issue20544.txt http://jenkins-ci.org/commit/warnings-plugin/c7cd170d486979d9c49bfa1085d8198062b3a067 Log: [ JENKINS-20544 ] Added a test case.

          Ulli Hafner added a comment -

          Which plugin version are you using? I added a test case that works correctly... Is this exactly your output? If not (compare to https://github.com/jenkinsci/warnings-plugin/commit/c7cd170d486979d9c49bfa1085d8198062b3a067) please attach it as a text file...

          Ulli Hafner added a comment - Which plugin version are you using? I added a test case that works correctly... Is this exactly your output? If not (compare to https://github.com/jenkinsci/warnings-plugin/commit/c7cd170d486979d9c49bfa1085d8198062b3a067 ) please attach it as a text file...

          Shannon Kerr added a comment -

          Sorry @Ulli, it's been too busy around here. I'm using the latest version of the plugin. I'm attaching a screenshot.

          Shannon Kerr added a comment - Sorry @Ulli, it's been too busy around here. I'm using the latest version of the plugin. I'm attaching a screenshot.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/warnings/parser/MsBuildParser.java
          src/test/resources/hudson/plugins/warnings/parser/issue20544.txt
          http://jenkins-ci.org/commit/warnings-plugin/a65645854ac2334b14e5a226f4c63d4518620880
          Log:
          [FIXED JENKINS-20544] Skip double colons :: when parsing warning category.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/warnings/parser/MsBuildParser.java src/test/resources/hudson/plugins/warnings/parser/issue20544.txt http://jenkins-ci.org/commit/warnings-plugin/a65645854ac2334b14e5a226f4c63d4518620880 Log: [FIXED JENKINS-20544] Skip double colons :: when parsing warning category.

            drulli Ulli Hafner
            kerrhome Shannon Kerr
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: