Tuesday, 10 January 2012

Editing components and charts in Coverity Integrity Control

This wasn't the most clear-cut thing to do. Maybe this is explained in the CIC training which I skipped?

Anyways, it's relatively easy to edit the component map and charts in CIC. The instructions in the INSTALL.txt are a bit misleading, though. If you run the ImportCategories command again, you will get duplicate charts and there is no apparent way of getting rid of them.

The correct (?) way is to copy the files with the desired component map and charts from the CIC installation directory to CIM config directory and name them nodes.xml and categories.xml, respectively.

Then go to CIC config window, XML upload and load the file that has the changes. This will clear any existing data and apply the changes. This will not touch the actual data in any way.

Monday, 9 January 2012

Coverity SA Control

I have been running Coverity SA on a number of SW components and remembering the parameters was getting to be a bit of a drag. I had them documented in a Word document but opening that up every time was also getting annoying, so I wrote a script to handle this. This script allows you to add the components to a configuration script rather than on the command line and also helps unattended analysis (i.e. during nightly builds).

The script has a few key features:

  • Completely configurable targets (no need to change the script),
  • Configuration file can be defined on command-line or you can use the default,
  • Can read login information from .smbpasswd file for unattended execution,
  • Can select phase (build, analyze, commit) or run all three at one go (I would suggest to add a check for successful build, though).

The configuration file should have the following common settings:
# General settings

And for each build target also the following:

# Target is called "TARGET" (this would be the value of the -b parameter). If no prebuild is required, leave these empty