• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • tasks-plugin
    • None
    • Platform: All, OS: All

      Add support for scanning the build log for tasks (such as compile warnings or
      test cases that failed). This might just be a documentation issue.

      This would greatly improve integration with C based projects (yes, yuck, I know)
      – hudson actually excels in this area for doing distributed multi-os builds

          [JENKINS-1446] tasks should scan build log

          Ulli Hafner added a comment -

          How do you like this feature to be implemented? Do you have a single occurrence
          of a string you want to look for or will this string occur multiple times?

          I'm just wondering if it isn't better to have this feature in a new plug-in (or
          two, see below). Currently I'm scanning a set of workspace files, group them by
          package/project and show the tasks by priority and file.

          I see the following two requirements:

          1.) In our project we have the requirement to fail a build, if the build log
          contains the string ERROR. So maybe I should add a special priority ERROR to the
          tasks plugin to fail the build if the log (or any of the workspace files)
          contains a regexp? Or do you just need the references of the found texts and no
          failure?

          2.) What I'm planning anyway is to create a new plug-in that scans the build log
          for (Java) compiler warnings that works in the same way as my other plugins.
          Maybe this will be a better extension point for your C compiler warnings.

          Ulli Hafner added a comment - How do you like this feature to be implemented? Do you have a single occurrence of a string you want to look for or will this string occur multiple times? I'm just wondering if it isn't better to have this feature in a new plug-in (or two, see below). Currently I'm scanning a set of workspace files, group them by package/project and show the tasks by priority and file. I see the following two requirements: 1.) In our project we have the requirement to fail a build, if the build log contains the string ERROR. So maybe I should add a special priority ERROR to the tasks plugin to fail the build if the log (or any of the workspace files) contains a regexp? Or do you just need the references of the found texts and no failure? 2.) What I'm planning anyway is to create a new plug-in that scans the build log for (Java) compiler warnings that works in the same way as my other plugins. Maybe this will be a better extension point for your C compiler warnings.

          Ulli Hafner added a comment -

          1) Requirement is already provided by text scanner plugin.

          2.) Answer from gbr4:

          I was specifically looking for a way to flag any compiler or other toolchain
          warnings as tasks to be addressed. There would be multiple occurrences of these
          warnings. To make things slightly more complicated I am using matrix builds, so
          I would want this log parsed:
          https://hudson.idm.cit.cornell.edu/hudson/job/cuwal2/90/APVer=2.2.8,label=Linux-RHEL4/console

          not this one:
          https://hudson.idm.cit.cornell.edu/hudson/job/cuwal2/90/console

          What I've done so far is to pipe the output of make through tee and run task
          scanner on the resulting log. That sort of works but is ugly. And the tasks flag
          the log instead of the files that need to be fixed.

          The other thing is the warning format is usually very standard:
          filename:line: warning: message

          If there were a way to have task scanner highlight the line of source that
          caused the warning instead of the line of the log that would be great. Here are
          two example warnings.

          /users/idmbuild/local/httpd-2.2.8/build/libtool --silent --mode=compile gcc
          -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2
          -pthread -I/users/idmbuild/local/httpd-2.2.8/include
          -I/users/idmbuild/local/httpd-2.2.8/include
          -I/users/idmbuild/local/httpd-2.2.8/include -g -Wall -I./test_restore/ -I./
          -I.. -I../log -I../config2 -I../apache -I../util -I../cred -I../permit
          -I../session -I../pal -I../sha1 -I../highAvail
          -I/users/idmbuild/local/krb5-1.6.3/include
          -I/users/idmbuild/local/openssl-0.9.8g/include -DHAVE_SSL -DAPACHE_BUILD -c -o
          cuwl_html.lo cuwl_html.c && touch cuwl_html.slo
          cuwl_html.c: In function `cuwl_send_response':
          cuwl_html.c:119: warning: implicit declaration of function `ap_rprintf'

          /users/idmbuild/local/httpd-2.2.8/build/libtool --silent --mode=compile gcc
          -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2
          -pthread -I/users/idmbuild/local/httpd-2.2.8/include
          -I/users/idmbuild/local/httpd-2.2.8/include
          -I/users/idmbuild/local/httpd-2.2.8/include -g -Wall -I./ -I.. -I../log
          -I../config2 -I../apache -I../util -I../cred -I../permit -I../session -I../pal
          -I../sha1 -I../highAvail -I/users/idmbuild/local/krb5-1.6.3/include
          -I/users/idmbuild/local/openssl-0.9.8g/include -DAPACHE_BUILD -DHAVE_SSL -c -o
          ../apache/session_bucket.lo ../apache/session_bucket.c && touch
          ../apache/session_bucket.slo
          ../apache/session_bucket.c:121: warning: initialization from incompatible
          pointer type

          Ulli Hafner added a comment - 1) Requirement is already provided by text scanner plugin. 2.) Answer from gbr4: I was specifically looking for a way to flag any compiler or other toolchain warnings as tasks to be addressed. There would be multiple occurrences of these warnings. To make things slightly more complicated I am using matrix builds, so I would want this log parsed: https://hudson.idm.cit.cornell.edu/hudson/job/cuwal2/90/APVer=2.2.8,label=Linux-RHEL4/console not this one: https://hudson.idm.cit.cornell.edu/hudson/job/cuwal2/90/console What I've done so far is to pipe the output of make through tee and run task scanner on the resulting log. That sort of works but is ugly. And the tasks flag the log instead of the files that need to be fixed. The other thing is the warning format is usually very standard: filename:line: warning: message If there were a way to have task scanner highlight the line of source that caused the warning instead of the line of the log that would be great. Here are two example warnings. /users/idmbuild/local/httpd-2.2.8/build/libtool --silent --mode=compile gcc -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -I/users/idmbuild/local/httpd-2.2.8/include -I/users/idmbuild/local/httpd-2.2.8/include -I/users/idmbuild/local/httpd-2.2.8/include -g -Wall -I./test_restore/ -I./ -I.. -I../log -I../config2 -I../apache -I../util -I../cred -I../permit -I../session -I../pal -I../sha1 -I../highAvail -I/users/idmbuild/local/krb5-1.6.3/include -I/users/idmbuild/local/openssl-0.9.8g/include -DHAVE_SSL -DAPACHE_BUILD -c -o cuwl_html.lo cuwl_html.c && touch cuwl_html.slo cuwl_html.c: In function `cuwl_send_response': cuwl_html.c:119: warning: implicit declaration of function `ap_rprintf' /users/idmbuild/local/httpd-2.2.8/build/libtool --silent --mode=compile gcc -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -I/users/idmbuild/local/httpd-2.2.8/include -I/users/idmbuild/local/httpd-2.2.8/include -I/users/idmbuild/local/httpd-2.2.8/include -g -Wall -I./ -I.. -I../log -I../config2 -I../apache -I../util -I../cred -I../permit -I../session -I../pal -I../sha1 -I../highAvail -I/users/idmbuild/local/krb5-1.6.3/include -I/users/idmbuild/local/openssl-0.9.8g/include -DAPACHE_BUILD -DHAVE_SSL -c -o ../apache/session_bucket.lo ../apache/session_bucket.c && touch ../apache/session_bucket.slo ../apache/session_bucket.c:121: warning: initialization from incompatible pointer type

          Ulli Hafner added a comment -

          I created a new plug-in: warnings. This scans the build log for compiler
          warnings. Currently, parsing support is available for javac and hpi compile.

          Writing a C parser shouldn't be a problem. Are you interesting in providing this
          part of the implementation?

          Ulli Hafner added a comment - I created a new plug-in: warnings. This scans the build log for compiler warnings. Currently, parsing support is available for javac and hpi compile. Writing a C parser shouldn't be a problem. Are you interesting in providing this part of the implementation?

          Ulli Hafner added a comment -

          The new pluing is released. Please use
          https://hudson.dev.java.net/issues/show_bug.cgi?id=1688 to request compiler parsers.

          Ulli Hafner added a comment - The new pluing is released. Please use https://hudson.dev.java.net/issues/show_bug.cgi?id=1688 to request compiler parsers.

            drulli Ulli Hafner
            gbr4 gbr4
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: