• Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • warnings-plugin
    • None

      Imagine a regular build job where you run several build-steps in a row, e.G
      cmake
      make (whatever compiler)
      lint
      doxygen
      etc..

      Now it sometimes happens that two parsers match the same line and you end up with false positives. So it would be handy to limit a console parser to a specific build step (or may be several build steps, or the otherway round, exclude build-steps).

          [JENKINS-28174] Limit a Console Parser to a build step

          Ulli Hafner added a comment -

          Maybe it would be easier to improve the regexp in each parser. Can you please show an example log message that is picked by two parsers?

          (BTW: you can redirect the output to a file to get the desired result)

          Ulli Hafner added a comment - Maybe it would be easier to improve the regexp in each parser. Can you please show an example log message that is picked by two parsers? (BTW: you can redirect the output to a file to get the desired result)

          usecase/example log:
          i'll need a week or two to reproduce this.

          redirection:
          (on windows) i do not know a way to redirect the output of build steps to a file and to the jenkins-console or can this be done by means of on-board jenkins functionality?
          Having no console output on jenkins is somehow no option since you loose the little progress indicator you have for a 1h build job.

          Florian Reinhard added a comment - usecase/example log: i'll need a week or two to reproduce this. redirection: (on windows) i do not know a way to redirect the output of build steps to a file and to the jenkins-console or can this be done by means of on-board jenkins functionality? Having no console output on jenkins is somehow no option since you loose the little progress indicator you have for a 1h build job.

          I'll add examples for "false positives" as i encounter them:

          This is a line that i see when i run doxygen generation:
          Problems running dot: exit code=-1, command='dot', arguments='"D:/jenkins/jobs/myjob/WORKSP~1/BUILDT~1/somefolder/doxydoc/html/d6/d52/structt_something_collgraph.dot" -Tpng -o "D:/jenkins/jobs/myjob/WORKSP~1/BUILDT~1/somefolder/doxydoc/html/d6/d52/structt_somethingcoll_graph.png"'

          This line is then matched by the "Texas Instruments" parser.

          Florian Reinhard added a comment - I'll add examples for "false positives" as i encounter them: This is a line that i see when i run doxygen generation: Problems running dot: exit code=-1, command='dot', arguments='"D:/jenkins/jobs/myjob/WORKSP~1/BUILDT~1/somefolder/doxydoc/html/d6/d52/structt_something_ coll graph.dot" -Tpng -o "D:/jenkins/jobs/myjob/WORKSP~1/BUILDT~1/somefolder/doxydoc/html/d6/d52/structt_something coll _graph.png"' This line is then matched by the "Texas Instruments" parser.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/test/resources/hudson/plugins/warnings/parser/ticcs.txt
          http://jenkins-ci.org/commit/warnings-plugin/37dd59559c3317e3f83327f7d066a8952801e552
          Log:
          Tried to reproduce JENKINS-28174.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/test/resources/hudson/plugins/warnings/parser/ticcs.txt http://jenkins-ci.org/commit/warnings-plugin/37dd59559c3317e3f83327f7d066a8952801e552 Log: Tried to reproduce JENKINS-28174 .

          Ulli Hafner added a comment - - edited

          Can you please check if the added line matches the line you identified? If not, please wrap the affected line in noformat blocks so Jira will not reformat them.

          The unit test does not report this line as a warning...

          Ulli Hafner added a comment - - edited Can you please check if the added line matches the line you identified? If not, please wrap the affected line in noformat blocks so Jira will not reformat them. The unit test does not report this line as a warning...

          I'm very sorry, i didn't copy the whole line! besides the "error:" at the beginning, the quotationmarks seem to be correct!

          Here's the whole line:
          error: Problems running dot: exit code=-1, command='dot', arguments='"D:/testproject/doxydoc/html/inherit_graph_63.dot" -Tpng -o "D:/testproject/doxydoc/html/inherit_graph_63.png"'

          I tried this with some online regex tester and there's a match:
          http://fiddle.re/86wnj6 (click on the green "java" button)

          Florian Reinhard added a comment - I'm very sorry, i didn't copy the whole line! besides the "error:" at the beginning, the quotationmarks seem to be correct! Here's the whole line: error: Problems running dot: exit code=-1, command='dot', arguments='"D:/testproject/doxydoc/html/inherit_graph_63.dot" -Tpng -o "D:/testproject/doxydoc/html/inherit_graph_63.png"' I tried this with some online regex tester and there's a match: http://fiddle.re/86wnj6 (click on the green "java" button)

          Ulli Hafner added a comment -

          I see. These warnings are nearly identical. The only difference is a missing : in the Texas Instruments warning. I don't think that it is a good idea to check for the absence of the :, so an update of the regexp is nearly impossible...

          As a workaround I suggest that you pipe the output of your build steps to a file and then use a different parser for each file.

          Ulli Hafner added a comment - I see. These warnings are nearly identical. The only difference is a missing : in the Texas Instruments warning. I don't think that it is a good idea to check for the absence of the :, so an update of the regexp is nearly impossible... As a workaround I suggest that you pipe the output of your build steps to a file and then use a different parser for each file.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          warnings
          http://jenkins-ci.org/commit/analysis-suite-plugin/e15113485ce95b7dedcbe0becc1ccb176a88e76f
          Log:
          Tried to reproduce JENKINS-28174.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: warnings http://jenkins-ci.org/commit/analysis-suite-plugin/e15113485ce95b7dedcbe0becc1ccb176a88e76f Log: Tried to reproduce JENKINS-28174 .

          Ulli Hafner added a comment -

          I think it would be much simpler to pipe the result to a file and use the files parser.

          Ulli Hafner added a comment - I think it would be much simpler to pipe the result to a file and use the files parser.

            drulli Ulli Hafner
            freinhard Florian Reinhard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: