Generate a build specification for Electric Cloud
|In this topic:|
The steps involved in creating a build specification in the Electric Cloud environment are:
- Create an emake annotation file. This XML annotation file is a structured log of the distributed build, with some extra information (such as automatically tracked dependencies and time metrics).
- Convert the annotation file into a Klocwork build trace. A build trace is a file that contains the sequence of process calls that took place during your build (for example, the make command).
- Use the build trace to create a build specification or build specification template.
- You can use multiple build specifications as input to the Klocwork integration build analysis with kwecbuild, so if you have multiple annotation files, you can create a build specification for each one.
- For more information on creating build specifications, including customizing the compiler mapping file (kwfilter.conf) and compiler filter files, see How kwinject works.
To create a build specification in the Electric Cloud environment
- Run emake with the following options to generate an annotation file:
emake --emake-cm=<clusterManagerHost> --emake-annodetail=basic --emake-annofile=<annotation_file>where
Note: You must use the same working directory for emake and kwecbuild.
- <clusterManagerHost> is the host where the cluster manager is installed
- <annotation_file> is the output build log
emake --emake-cm=serverXYZ --emake-annodetail=basic --emake-annofile=emake.xml
- Run kwlogparser to convert the annotation file into a build trace:
kwlogparser [options] <parser> <annotation_file>
kwlogparser -o emake.trace emake-annotation emake.xml
This command converts the emake annotation log file named emake.xml into a build trace named emake.trace.
- Run kwinject to convert the build trace into a build specification or build specification template:
kwinject --trace-in <file> [options]
kwinject --trace-in emake.trace -o emake.out
This command converts the trace file we generated in step 2 into a build specification named emake.out.
When do I need to update my build specification?
You need to update or create a new build specification in the following situations:
- if source files are added or removed
- if build settings are changed
If you reuse an existing build specification or try to modify it manually in these situations, the analysis results will not be accurate.