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

GoogleTest failure interpreted as compiler error on VC10_64

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-plugin
    • None
    • Jenkins 1.588
      Warnings-Plugin 4.45
      googletest 1.6.0
      Windows 7 VC10_64

      We are using the warnings-plugin after a compilation pass with VC10_64 and a subsequent step of running a google-test binary. The gtest produces a test failure using the EXPECT_LE macro. The error message is printed below. Regrettably this is interpreted as compiler error by the warnings-plugin.

      The confusing part of this is that on Linux/OSX gtest prints the same message, but with "error" being replaced by "Failure". On those platforms the warnings-plugin works as expected.

      I don't know how to discriminate this from a compiler message. Maybe by looking for "Expected:" after the error?

      [  FAILED  ] allCases/ReferenceCaseTest.ROIRequirementsTest/25, where GetParam() = (19, 1) (11760 ms)
      [ RUN      ] allCases/ReferenceCaseTest.ROIRequirementsTest/29
      C:\Program Files (x86)\Jenkins\jobs\MyJob\workspace\MyProject\testing\regression_tests\BackToBackTest\ROIRequirements.cpp(168): error: Expected: (xEdgeLength) <= (maxEdgeLength), actual: 150.781 vs 150

          [JENKINS-26441] GoogleTest failure interpreted as compiler error on VC10_64

          Ulli Hafner added a comment -

          Which parser are you using?

          Ulli Hafner added a comment - Which parser are you using?

          Ruben Stein added a comment -

          We are using MSBuild. Am I misinterpreting something and that is wrong for VC?

          By the way I just want to mention that I found the spot in google-test where they explicitly branch and print "error:" for windows and "Failure:" for other OSes. Seems to be intentional to simulate compiler errors. Maybe to support highlighting in IDEs?

          Ruben Stein added a comment - We are using MSBuild. Am I misinterpreting something and that is wrong for VC? By the way I just want to mention that I found the spot in google-test where they explicitly branch and print "error:" for windows and "Failure:" for other OSes. Seems to be intentional to simulate compiler errors. Maybe to support highlighting in IDEs?

          Ulli Hafner added a comment -

          We are using MSBuild. Am I misinterpreting something and that is wrong for VC?

          No. In order to fix the bug I need to know which of the >50 parsers I need to change

          I think we can add an additional check that removes all warnings that have a messages that starts with "Expected:".

          Ulli Hafner added a comment - We are using MSBuild. Am I misinterpreting something and that is wrong for VC? No. In order to fix the bug I need to know which of the >50 parsers I need to change I think we can add an additional check that removes all warnings that have a messages that starts with "Expected:".

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/warnings/parser/MsBuildParser.java
          src/test/java/hudson/plugins/warnings/parser/MsBuildParserTest.java
          src/test/resources/hudson/plugins/warnings/parser/issue26441.txt
          http://jenkins-ci.org/commit/warnings-plugin/de756f7b09af540452e545ebaf3ac5f9672ccf98
          Log:
          [FIXED JENKINS-26441] Fixed false positive caused by google-test messages.

          Compare: https://github.com/jenkinsci/warnings-plugin/compare/39158dafa05d...de756f7b09af

          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/java/hudson/plugins/warnings/parser/MsBuildParserTest.java src/test/resources/hudson/plugins/warnings/parser/issue26441.txt http://jenkins-ci.org/commit/warnings-plugin/de756f7b09af540452e545ebaf3ac5f9672ccf98 Log: [FIXED JENKINS-26441] Fixed false positive caused by google-test messages. Compare: https://github.com/jenkinsci/warnings-plugin/compare/39158dafa05d...de756f7b09af

            drulli Ulli Hafner
            rst Ruben Stein
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: