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

xcodebuild test failures are treated as warnings

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • warnings-plugin
    • None
    • Jenkins 1.639
      Warnings Plug-in 4.51
      OS X 10.11.1
      Jenkins installed through brew

      Standard unit test failure log lines like this are shown as warnings by the warnings plugin:

      /Volumes/workspace/MyApp/Splot.m:85: error: -[SplotTests testSplots] : (([hereItGoes isThisOrThat:SetDefault]) is true) failed - Splot does not exists
      

      Warnings have Priority - High, Type Clang(LLVM based) and text after 'error:' after description.

          [JENKINS-31936] xcodebuild test failures are treated as warnings

          Ulli Hafner added a comment -

          Which parser?
          Can you please wrap the log into noformat blocks?

          Ulli Hafner added a comment - Which parser? Can you please wrap the log into noformat blocks?

          The parser is Clang (LLVM based).
          Could you please elaborate how should noformat blocks look like? I could not find any description.
          Not sure if log wrapping is possible since build and test phases and logs are performed in a single xcodebuild command. Build phase naturally contains meaningful warnings logs.

          Alexander Vorobiev added a comment - The parser is Clang (LLVM based). Could you please elaborate how should noformat blocks look like? I could not find any description. Not sure if log wrapping is possible since build and test phases and logs are performed in a single xcodebuild command. Build phase naturally contains meaningful warnings logs.

          Ulli Hafner added a comment -

          See https://issues.jenkins-ci.org/secure/WikiRendererHelpAction.jspa?section=advanced

          I wrapped the block now, is the text in the description exactly the same as in your logfile?

          Ulli Hafner added a comment - See https://issues.jenkins-ci.org/secure/WikiRendererHelpAction.jspa?section=advanced I wrapped the block now, is the text in the description exactly the same as in your logfile?

          Ah, thank you. I was under impression that you are talking about a kind of workaround to skip some part of a log being parsed.
          Log line now looks exactly as I see in logfile.

          Warning line has line and column digits after file name. Error might have the same format. Here is an example:

          /Volumes/workspace/MyApp/ViewController.m:1211:26: warning: implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int' [-Wshorten-64-to-32]
          

          Alexander Vorobiev added a comment - Ah, thank you. I was under impression that you are talking about a kind of workaround to skip some part of a log being parsed. Log line now looks exactly as I see in logfile. Warning line has line and column digits after file name. Error might have the same format. Here is an example: /Volumes/workspace/MyApp/ViewController.m:1211:26: warning: implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int' [-Wshorten-64-to-32]

          Ulli Hafner added a comment - - edited

          Can you add another test failure, I'm not sure if the following pattern is sufficient to identify a unit test failure:

          -[SplotTests testSplots]
          

          Contain all test failures the pattern -[some text].?

          Ulli Hafner added a comment - - edited Can you add another test failure, I'm not sure if the following pattern is sufficient to identify a unit test failure: -[SplotTests testSplots] Contain all test failures the pattern -[some text] .?

          Sure, here is another test failure. I have looked through several the test failures I have now - they all follow

           -[TestSuite Test] 

          pattern.

          /Volumes/workspaceMyApp/InitTests.m:132: error: -[InitTests testOnRocks] : (([topViewController isKindOfClass:[DemoViewController class]]) is true) failed - demo view is not on top
          

          Alexander Vorobiev added a comment - Sure, here is another test failure. I have looked through several the test failures I have now - they all follow -[TestSuite Test] pattern. /Volumes/workspaceMyApp/InitTests.m:132: error: -[InitTests testOnRocks] : (([topViewController isKindOfClass:[DemoViewController class]]) is true) failed - demo view is not on top

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/warnings/parser/ClangParser.java
          src/test/java/hudson/plugins/warnings/parser/ClangParserTest.java
          src/test/resources/hudson/plugins/warnings/parser/issue31936.txt
          http://jenkins-ci.org/commit/warnings-plugin/197a836104e1d4aa11cc54e8354341c5594aa0c1
          Log:
          [FIXED JENKINS-31936] Skip test results when parsing Clang warnings.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/warnings/parser/ClangParser.java src/test/java/hudson/plugins/warnings/parser/ClangParserTest.java src/test/resources/hudson/plugins/warnings/parser/issue31936.txt http://jenkins-ci.org/commit/warnings-plugin/197a836104e1d4aa11cc54e8354341c5594aa0c1 Log: [FIXED JENKINS-31936] Skip test results when parsing Clang warnings.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          analysis-collector
          warnings
          http://jenkins-ci.org/commit/analysis-suite-plugin/07368e8eef97804c375fb5c162585568e04d8bce
          Log:
          [FIXED JENKINS-31936] Skip test results when parsing Clang warnings.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: analysis-collector warnings http://jenkins-ci.org/commit/analysis-suite-plugin/07368e8eef97804c375fb5c162585568e04d8bce Log: [FIXED JENKINS-31936] Skip test results when parsing Clang warnings.

          No noise in the logs any more. Thank you.

          Alexander Vorobiev added a comment - No noise in the logs any more. Thank you.

            drulli Ulli Hafner
            vorobievalex Alexander Vorobiev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: