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.
Tuesday, 10 January 2012
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:
The configuration file should have the following common settings:
# General settings
COVERITY_BIN_DIR="/location/of/coverity/bin/dir"
CONFIG_FILE="/location/of/coverity/config/dir/coverity_config.xml"
USER_MODEL_FILE="/location/of/user-model-file"
ANALYSIS_OPTIONS="analysis-options-used"
COVERITY_HOST="CIM_SERVER_ADDRESS"
COVERITY_PORT="CIM_SERVER_PORT"
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
TARGET_PREBUILD_DIR="DIRECTORY_WHERE_PREBUILD_SCRIPT IS"
TARGET_PREBUILD_CMD="PREBUILD COMMAND TO RUN"
TARGET_BUILD_DIR="DIRECTORY_WHERE_BUILD_COMMAND_IS_LOCATED"
TARGET_BUILD_CMD="BUILD_COMMAND"
TARGET_STREAM="STREAM_NAME"
TARGET_STRIP_PATH="PART_OF_PATH_TO_STRIP"
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
COVERITY_BIN_DIR="/location/of/coverity/bin/dir"
CONFIG_FILE="/location/of/coverity/config/dir/coverity_config.xml"
USER_MODEL_FILE="/location/of/user-model-file"
ANALYSIS_OPTIONS="analysis-options-used"
COVERITY_HOST="CIM_SERVER_ADDRESS"
COVERITY_PORT="CIM_SERVER_PORT"
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
TARGET_PREBUILD_DIR="DIRECTORY_WHERE_PREBUILD_SCRIPT IS"
TARGET_PREBUILD_CMD="PREBUILD COMMAND TO RUN"
TARGET_BUILD_DIR="DIRECTORY_WHERE_BUILD_COMMAND_IS_LOCATED"
TARGET_BUILD_CMD="BUILD_COMMAND"
TARGET_STREAM="STREAM_NAME"
TARGET_STRIP_PATH="PART_OF_PATH_TO_STRIP"
Wednesday, 21 December 2011
Checking Coverity builds
Labels:
coverity
I'll write another Coverity related post right after the previous one to not forget..
In Coverity you need to be very careful that what you analyze is really what you wanted to. First off of course you need to have the correct compiler configured, missing function models defined and correct compilation flags being used for the Coverity build. These are usually a one-off job, but depending on your workflow there might be problems making sure that the new snapshot really is built exactly like the previous one. You have to remember to clean the build etc very carefully.
There are a few things to check out:
In Coverity you need to be very careful that what you analyze is really what you wanted to. First off of course you need to have the correct compiler configured, missing function models defined and correct compilation flags being used for the Coverity build. These are usually a one-off job, but depending on your workflow there might be problems making sure that the new snapshot really is built exactly like the previous one. You have to remember to clean the build etc very carefully.
There are a few things to check out:
- Did Coverity compile everything? It says at the end of the process what percentage of units were compiled. This should be 100.
- Do you see an unexpectedly high number of fixed and/or new defects? This can reveal issues listed above.
- Are there any errors in the build log (build-log.txt in the intermediary directory)? Search for "error #" in the log. This should also show in the percentage.
- Are there any warnings in the build log? Search for "warning #" in the log. These can prevent Coverity from analyzing functions.
- Are there any asserts? This is a rare Coverity bug and also should show in the percentage as well. Search for "Assertion failed". There are instructions on how to get past this issue in the build log. It involves setting COVERITY_SUPPRESS_ASSERT.
Coverity and Bitbake
Labels:
bitbake,
coverity,
programming
Coverity is a useful tool but boy can it take time to get it to work, especially if your compiler is not supported.
The latest issue, however, was more interesting. Apparently Bitbake shouldn't be a problem, but it was with us. The bitbake script cleans all environment variables except those whitelisted before it runs and as it happens, Coverity requires certain variables to be kept.
This problem can be solved by editing the /lib/bb/utils.py. There is a function called preserved_envvars_list() which returns an array of whitelisted environment variables. In order to make Coverity work, you need to add the following variables to that list:
EDIT: I was told of a few more variables in the Coverity Support Forum.
'LD_PRELOAD',
'COVERITY_BIN',
'COVERITY_SITE_CC',
'COVERITY_TEMP',
'COVERITY_IS_COMPILER',
'COVERITY_TOP_PROCESS',
'COVERITY_IS_COMPILER_DESCENDANT',
'COVERITY_OUTPUT',
'COVERITY_BUILD_INVOCATION_ID',
'COVERITY_COMPILER_PATH_MISMATCH_FILE',
'COVERITY_LD_PRELOAD',
'COVERITY_LD_PRELOAD_32',
'COVERITY_LD_PRELOAD_64'
'COVERITY_PATHLESS_CONFIGS_FILE',
'COVERITY_PREV_XML_CATALOG_FILES',
'COVERITY_START_CWD',
'COVERITY_TOP_CONFIG',
'LD_PRELOAD_32',
'LD_PRELOAD_64',
'PLATFORM',
'COVERITY_DEBUG',
'COVERITY_EMIT',
'COVERITY_LD_LIBRARY_PATH',
'COVERITY_TOP_PROCESS',
'COVERITY_USE_DOLLAR_PLATFORM'
The latest issue, however, was more interesting. Apparently Bitbake shouldn't be a problem, but it was with us. The bitbake script cleans all environment variables except those whitelisted before it runs and as it happens, Coverity requires certain variables to be kept.
This problem can be solved by editing the /lib/bb/utils.py. There is a function called preserved_envvars_list() which returns an array of whitelisted environment variables. In order to make Coverity work, you need to add the following variables to that list:
EDIT: I was told of a few more variables in the Coverity Support Forum.
'LD_PRELOAD',
'COVERITY_BIN',
'COVERITY_SITE_CC',
'COVERITY_TEMP',
'COVERITY_IS_COMPILER',
'COVERITY_TOP_PROCESS',
'COVERITY_IS_COMPILER_DESCENDANT',
'COVERITY_OUTPUT',
'COVERITY_BUILD_INVOCATION_ID',
'COVERITY_COMPILER_PATH_MISMATCH_FILE',
'COVERITY_LD_PRELOAD',
'COVERITY_LD_PRELOAD_32',
'COVERITY_LD_PRELOAD_64'
'COVERITY_PATHLESS_CONFIGS_FILE',
'COVERITY_PREV_XML_CATALOG_FILES',
'COVERITY_START_CWD',
'COVERITY_TOP_CONFIG',
'LD_PRELOAD_32',
'LD_PRELOAD_64',
'PLATFORM',
'COVERITY_DEBUG',
'COVERITY_EMIT',
'COVERITY_LD_LIBRARY_PATH',
'COVERITY_TOP_PROCESS',
'COVERITY_USE_DOLLAR_PLATFORM'
Thursday, 10 November 2011
Like a Bus...
Labels:
spotify
Soos, my Samsung Galaxy S started acting weird (half of the applications failed to start) so I installed Darky's ROM into it. This of course required a complete reinstall & configuration of everything so I threw in Titanium Backup for good measure for the next time.
There is an issue with Spotify and external SD cards. It used to be impossible to use them on a Galaxy S, then they improved Spotify so you could fix this but it required a reinstall of Spotify (& some manual file cleaning). Now it's really simply, even if you have already installed Spotify:
There is an issue with Spotify and external SD cards. It used to be impossible to use them on a Galaxy S, then they improved Spotify so you could fix this but it required a reinstall of Spotify (& some manual file cleaning). Now it's really simply, even if you have already installed Spotify:
- Log out of Spotify.
- In the login screen hit the menu button & select "SD card location".
- The location on the Galaxy S is /mnt/sdcard/external_sd.
Eclipse fails to load & tool for Doxygen
I guess I've been lucky until now but I just had my first case of Eclipse failing to start. A quick googling found a solution. To recap:
The script will see which members have missing or incomplete documentation and will create an XML file that looks exactly like index.xml except for new attributes. This XML file can then be imported to e.g. Excel where one can use quick filters to calculate number of functions missing documentation etc.
DoxChecker is available from Gitorious.
P.S. My new computer (for which I listed some test tools) is definitely much quieter than the old box thanks to a much better case (Fractal Design R3), lots of fans, a special cooler and a quietish video card. Not as quiet as my HTPC, mind, which is practially completely quiet thanks to the lack of a video card.
- Close Eclipse.
- Backup & delete workspace/.metadata/.plugins/org.eclipse.core.resources.
- Start Eclipse.
- File -> Import -> Existing Projects into Workspace.
The script will see which members have missing or incomplete documentation and will create an XML file that looks exactly like index.xml except for new attributes. This XML file can then be imported to e.g. Excel where one can use quick filters to calculate number of functions missing documentation etc.
DoxChecker is available from Gitorious.
P.S. My new computer (for which I listed some test tools) is definitely much quieter than the old box thanks to a much better case (Fractal Design R3), lots of fans, a special cooler and a quietish video card. Not as quiet as my HTPC, mind, which is practially completely quiet thanks to the lack of a video card.
Thursday, 16 June 2011
Storing wishlists
I have been searching for a good way to store stuff that I want to buy in a meaningful place so that I can check them in a shop from my cell phone for a good time now. I tried some note taking applications but I didn't really find them easy enough to use.
I just came up with a solution that fits me. I have been using del.ici.us (as it was known before) to store bookmarks but I kind of stopped using it about two years when bookmark synchronization came to browsers (or rather I started using that feature). Bookmark sync isn't really useful for this sort of stuff, though, because it will just clutter your bookmarks folder.
delicious.com works better because it focused more on tag based browsing of your bookmarks so there is no problem having hundreds or even thousands of bookmarks stored there. So now I can just bookmark wishlist items and tag them accordingly (e.g. "books" and "wishlist"). In the store I'll just start up Andricious, and open bookmarks tagged "wishlist". Of course I need to do some cleaning once in a while to keep the list meaningful but then again, I'd need to do that with any system.
I like this approach because it is so flexible. Only real requirement is that the pages are named in a meaningful way (so that the name fits into the screen).
It will be interesting to see what happens to delicious now that it's moving to Yahoo. Hope they don't ruin it.
I just came up with a solution that fits me. I have been using del.ici.us (as it was known before) to store bookmarks but I kind of stopped using it about two years when bookmark synchronization came to browsers (or rather I started using that feature). Bookmark sync isn't really useful for this sort of stuff, though, because it will just clutter your bookmarks folder.
delicious.com works better because it focused more on tag based browsing of your bookmarks so there is no problem having hundreds or even thousands of bookmarks stored there. So now I can just bookmark wishlist items and tag them accordingly (e.g. "books" and "wishlist"). In the store I'll just start up Andricious, and open bookmarks tagged "wishlist". Of course I need to do some cleaning once in a while to keep the list meaningful but then again, I'd need to do that with any system.
I like this approach because it is so flexible. Only real requirement is that the pages are named in a meaningful way (so that the name fits into the screen).
It will be interesting to see what happens to delicious now that it's moving to Yahoo. Hope they don't ruin it.
Subscribe to:
Posts (Atom)
