587
|
1 |
.. index::
|
|
2 |
module: Configuring Coverity Prevent Tool with SBS
|
|
3 |
|
|
4 |
==========================================
|
|
5 |
Configuring Coverity Prevent Tool with SBS
|
|
6 |
==========================================
|
|
7 |
|
|
8 |
.. contents::
|
|
9 |
|
|
10 |
This document describes requirements and how to run coverity prevent tool with sbs builds using helium.
|
|
11 |
|
|
12 |
Requirements
|
|
13 |
-----------------
|
|
14 |
|
|
15 |
Please go through "Configuring Raptor (SBS)" before proceeding into this document.
|
|
16 |
|
|
17 |
|
|
18 |
Implementation
|
|
19 |
-----------------
|
|
20 |
- Coverity prevent tool commands are integrated with SBS task.
|
|
21 |
- Before starting the build we need to setup the property enabled.coverity=true to enable the coverity prevent tool with build.
|
|
22 |
- Coverity task extends the "sbstask", so what ever the arguments we pass for sbstask will remain same for coverity tool also.
|
|
23 |
- For example
|
|
24 |
|
|
25 |
.. code-block:: xml
|
|
26 |
|
|
27 |
<hlm:coveritybuild sbsinput="@{sbs.input}"
|
|
28 |
sysdeffile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml"
|
|
29 |
layerpatternsetref="${sbs.patternset}"
|
|
30 |
workingdir="${build.drive}/"
|
|
31 |
execute="true"
|
|
32 |
failonerror="false"
|
|
33 |
outputlog="${sbs.log.file}"
|
|
34 |
cleanlog = "${sbs.clean.log}"
|
|
35 |
erroroutput="${sbs.log.file}.sbs_error.log"
|
|
36 |
statslog="${sbs.log.file}.info.xml">
|
|
37 |
<hlm:coverityoptions refid="coverity.build.options"/>
|
|
38 |
</hlm:coveritybuild>
|
|
39 |
|
|
40 |
- In above example coverity prevent tool is integrated with sbs using task "coveritybuild".
|
|
41 |
- This task is slightly difference from sbstask as it accepts the coverity tool parameters required while running coverity tool.
|
|
42 |
- In the above example we have mentioned "coverity.build.options" which are required for cov-build command.
|
|
43 |
- coverityoptions datatype will follow below syntax.
|
|
44 |
|
|
45 |
.. code-block:: xml
|
|
46 |
|
|
47 |
<hlm:coverityoptions id="coverity.build.options">
|
|
48 |
<arg name="--config" value="${coverity.config.dir}/coverity_config.xml"/>
|
|
49 |
<arg name="--dir" value="${coverity.inter.dir}"/>
|
|
50 |
<arg name="--auto-diff" value=""/>
|
|
51 |
<arg name="--preprocess-first" value=""/>
|
|
52 |
<arg name="--record-only" value=""/>
|
|
53 |
</hlm:coverityoptions>
|
|
54 |
|
|
55 |
- Internally "coveritybuild" task will run the "cov-build" with parameters passed with "<hlm:coverityoptions>" datatype and sbs commands.
|
|
56 |
- Above arguments are passed by default in helium. If it is required to remove/change the default parameters (by helium)into cov-build, we need to override the datatype "coverityoptions".
|
|
57 |
|
|
58 |
- Command resulted for above example is shown below with "@{sbs.input} = dfs_build_input_armv5".
|
|
59 |
|
|
60 |
| cov-build.exe --auto-diff --record-only --config Y:/output/coverity/config/coverity_config.xml
|
|
61 |
| --preprocess-first --dir Y:/output/coverity/intermidiate sbs -s Y:/output/build/canonical_system_definition_dfs_build.xml
|
|
62 |
| -c armv5 --filters=FilterMetadataLog -k --logfile Y:/output/logs/compile/ido_helloworld_tb92_blr_ci_9.2.30_armv5_dfs_build.log
|
|
63 |
| --makefile=Y:/output/logs/compile/ido_helloworld_tb92_blr_ci_9.2.30_armv5_dfs_build
|
|
64 |
|
|
65 |
Note:
|
|
66 |
--------------------
|
|
67 |
- Helium also supports other coverity tool commands. Please refer to section to "Coverity Prevent Tool" section.
|
|
68 |
- Coverity tool prevent tool can't run with emake. emake options are disabled with <hlm:coveritybuild> task if "build.system=sbs-ec".
|
|
69 |
|
|
70 |
|