Coverity plugin

1,016 views
Skip to first unread message

Théo Chamley

unread,
Sep 14, 2012, 8:31:35 AM9/14/12
to jenkins...@googlegroups.com
Hello,
I am trying to make Jenkins and Coverity Static Analysis work together for projects in C/C++. I have a Jenkins Master on an Ubuntu 12.04 and a Jenkins Slave and Coverity both on the same Debian Lenny. My version of Jenkins is the 1.466.1. The builds ont Jenkins are triggered by Gerrit: when a change is pushed on a project, the Jenkins master tells the slave to download the sources and build the project. This part alone works fine. I also managed to make Coverity SA work on its own: the tools cov-build, cov-analyze and cov-commit-defects are working.
Now, I want to integrate Coverity with Jenkins: I installed the latest version of this plugin. In the configuration of my project on Jenkins, I added a Coverity post-build action, specified an Coverity Integrity Manager Instance, a coverity project and stream. I want Jenkins to perform a Coverity build, analysis and commit. According to the help window of this option, "Jenkins will automatically monitor the build using cov-build, then invoke cov-analyze and cov-commit-defects". Then, when a build is triggered, Jenkins successfully connect to the slave who downloads and builds the project, but the cov-analyze is launched and it fails because of the absence of intermediate directory. As I understand it, cov-build is never launched and does not "monitor the build", therefore the intermediate directory needed for the analysis is never created.
 
Here is log of one of my failed builds:
 
Triggered by Gerrit: http://gerrit.server1/22
Building remotely on Jenkins Coverity in workspace /home/coverity/workspace/HelloWorldC
Checkout:HelloWorldC / /home/coverity/workspace/HelloWorldC - hudson.remoting.Channel@785b38d6:Jenkins Coverity
Using strategy: Gerrit Trigger
Last Built Revision: Revision 5540c6e5802a75d0ba0ccb3463deed2a7bca9424 (master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from ssh://jenkins@server1:29418/HelloWorldC.git
Commencing build of Revision 5540c6e5802a75d0ba0ccb3463deed2a7bca9424 (master)
Checking out Revision 5540c6e5802a75d0ba0ccb3463deed2a7bca9424 (master)
[Coverity] cmd so far is: [cov-analyze, --dir, /home/coverity/coverity/temp-550893439800959750.tmp]
[HelloWorldC] $ cov-analyze --dir /home/coverity/coverity/temp-550893439800959750.tmp
[ERROR] This script reads input from the Intermediate directory, and the specified directory /home/coverity/coverity/temp-550893439800959750.tmp/c/emit does not exist.
Please read the documentation to determine the appropriate ordering in which to run the Coverity Prevent commands.
[Coverity] cov-analyze returned 1, aborting...
[Coverity] deleting intermediate directory
Build step 'Coverity' changed build result to FAILURE
Build step 'Coverity' marked build as failure
Finished: FAILURE
 
 

Does someone have a similar setup? What am i doing wrong?

Thank you for your help

Victoria Wei Lei

unread,
Jun 12, 2014, 10:54:29 AM6/12/14
to jenkins...@googlegroups.com
Hello, 
I am looking for help on run coverity through Jenkins as well.  Not able to find a post that helps me,  just wonder whether you were able to get yours working, and whether you  would like to share some ideas on how to do it. 

Thanks
Victoria 


On Friday, September 14, 2012 7:31:35 AM UTC-5, Théo Chamley wrote:
Hello,
I am trying to make Jenkins and Coverity Static Analysis work together for projects in C/C++. I have a Jenkins Master on an Ubuntu 12.04 and a Jenkins Slave and Coverity both on the same Debian Lenny. My version of Jenkins is the 1.466.1. The builds ont Jenkins are triggered by Gerrit: when a change is pushed on a project, the Jenkins master tells the slave to download the sources and build the project. This part alone works fine. I also managed to make Coverity SA work on its own: the tools cov-build, cov-analyze and cov-commit-defects are working.
Now, I want to integrate Coverity with Jenkins: I installed the latest version of this plugin. In the configuration of my project on Jenkins, I added a Coverity post-build action, specified an Coverity Integrity Manager Instance, a coverity project and stream. I want Jenkins to perform a Coverity build, analysis and commit. According to the help window of this option, "Jenkins will automatically monitor the build using cov-build, then invoke cov-analyze and cov-commit-defects". Then, when a build is triggered, Jenkins successfully connect to the slave who downloads and builds the project, but the cov-analyze is launched and it fails because of the absence of intermediate directory. As I understand it, cov-build is never launched and does not "monitor the build", therefore the intermediate directory needed for the analysis is never created.
 
Here is log of one of my failed builds:
 
Triggered by Gerrit: http://gerrit.server1/22
Building remotely on Jenkins Coverity in workspace /home/coverity/workspace/HelloWorldC
Checkout:HelloWorldC / /home/coverity/workspace/HelloWorldC - hudson.remo...@785b38d6:Jenkins Coverity
Using strategy: Gerrit Trigger
Last Built Revision: Revision 5540c6e5802a75d0ba0ccb3463deed2a7bca9424 (master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from ssh://jenkins@server1:29418/HelloWorldC.git
Commencing build of Revision 5540c6e5802a75d0ba0ccb3463deed2a7bca9424 (master)
Checking out Revision 5540c6e5802a75d0ba0ccb3463deed2a7bca9424 (master)
[Coverity] cmd so far is: [cov-analyze, --dir, /home/coverity/coverity/temp-550893439800959750.tmp]
[HelloWorldC] $ cov-analyze --dir /home/coverity/coverity/temp-550893439800959750.tmp
[ERROR] This script reads input from the Intermediate directory, and the specified directory /home/coverity/coverity/temp-550893439800959750.tmp/c/emit does not exist.
Please read the documentation to determine the appropriate ordering in which to run the Coverity Prevent commands.
[Coverity] cov-analyze returned 1, aborting...
[Coverity] deleting intermediate directory
Build step 'Coverity' changed build result to FAILURE
Build step 'Coverity' marked build as failure
Finished: FAILURE

Ginga, Dick

unread,
Jun 12, 2014, 11:33:46 AM6/12/14
to jenkins...@googlegroups.com

I have run Coverity with Jenkins. The latest plugin is better than previous ones but still not real robust.

 

What questions do you have?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Les Mikesell

unread,
Jun 12, 2014, 2:08:23 PM6/12/14
to jenkinsci-users
On Thu, Jun 12, 2014 at 10:33 AM, Ginga, Dick
<Dick....@perkinelmer.com> wrote:
> I have run Coverity with Jenkins. The latest plugin is better than previous
> ones but still not real robust.
>

We just do a batch/script that runs cov-build with the appropriate
command line options, then cov-analyze, then cov-commit. The latest
version of the plugin didn't work with our (not-latest) coverity
server. I did do some tests with a back-rev plugin and having a
pick-list of projects from the server was nice, but it seemed
confusing as to how the plugin options actually mapped to what it
would do with cov-build, etc.

--
Les Mikesell
lesmi...@gmail.com
Reply all
Reply to author
Forward
0 new messages