File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ find_program (COVERITY_BUILD NAMES cov-build REQUIRED )
3
+ find_program (COVERITY_CONFIGURE NAMES cov-configure REQUIRED )
4
+ message (STATUS "Found SCA: Coverity (${COVERITY_BUILD} )" )
5
+
6
+
7
+ zephyr_get (COVERITY_OUTPUT_DIR )
8
+
9
+ if (NOT COVERITY_OUTPUT_DIR )
10
+ set (output_dir ${CMAKE_BINARY_DIR} /sca/coverity )
11
+ else ()
12
+ set (output_dir ${COVERITY_OUTPUT_DIR} )
13
+ endif ()
14
+
15
+ file (MAKE_DIRECTORY ${output_dir} )
16
+
17
+ set (output_arg --dir=${output_dir} )
18
+
19
+
20
+ set (CMAKE_C_COMPILER_LAUNCHER ${COVERITY_BUILD} ${output_arg} CACHE INTERNAL "" )
21
+ set (CMAKE_CXX_COMPILER_LAUNCHER ${COVERITY_BUILD} ${output_arg} CACHE INTERNAL "" )
Original file line number Diff line number Diff line change
1
+ .. _coverity :
2
+
3
+ Coverity
4
+ #########
5
+
6
+ Coverity Scan is a service by which Black Duck provides the results of analysis
7
+ on open source coding projects to open source code developers that have
8
+ registered their products with Coverity Scan.
9
+
10
+ This integration was only tested with scan.coverity.com and the tool
11
+ distribution available through this service.
12
+
13
+ Generating Build Data Files
14
+ ***************************
15
+
16
+ To use this integration, coverity tool distribution must be found in your :envvar: `PATH ` environment and
17
+ :ref: `west build <west-building >` should be called with a ``-DZEPHYR_SCA_VARIANT=coverity ``
18
+ parameter, e.g.
19
+
20
+ .. code-block :: shell
21
+
22
+ west build -b qemu_cortex_m3 samples/hello_world -- -DZEPHYR_SCA_VARIANT=coverity
23
+
24
+
25
+ Results of the scan will be generated as :file: `build/sca/coverity `.
26
+
27
+ You can also set :envvar: `COVERITY_OUTPUT_DIR ` as the destination for multiple
28
+ and incremental scan results.
29
+
30
+ Result Analysis
31
+ ****************
32
+
33
+ Follow the instructions on http://scan.coverity.com for uploading results.
Original file line number Diff line number Diff line change @@ -67,3 +67,4 @@ The following is a list of SCA tools natively supported by Zephyr build system.
67
67
cpptest
68
68
eclair
69
69
polyspace
70
+ coverity
You can’t perform that action at this time.
0 commit comments