File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ .. _cpptest :
2+
3+ Parasoft C/C++test support
4+ ##########################
5+
6+ Parasoft `C/C++test <https://www.parasoft.com/products/parasoft-c-ctest/ >`__ is a software testing
7+ and static analysis tool for C and C++. It is a commercial software and you must acquire a
8+ commercial license to use it.
9+
10+ Documentation of C/C++test can be found at https://docs.parasoft.com/. Please refer to the
11+ documentation for how to use it.
12+
13+ Generating Build Data Files
14+ ***************************
15+
16+ To use C/C++test, ``cpptestscan `` must be found in your :envvar: `PATH ` environment variable. And
17+ :ref: `west build <west-building >` should be called with a ``-DZEPHYR_SCA_VARIANT=cpptest ``
18+ parameter, e.g.
19+
20+ .. code-block :: shell
21+
22+ west build -b qemu_cortex_m3 zephyr/samples/hello_world -- -DZEPHYR_SCA_VARIANT=cpptest
23+
24+
25+ A ``.bdf `` file will be generated as :file: `build/sca/cpptest/cpptestscan.bdf `.
26+
27+ Generating a report file
28+ ************************
29+
30+ Please refer to Parasoft C/C++test documentation for more details.
31+
32+ To import and generate a report file, something like the following should work.
33+
34+ .. code-block :: shell
35+
36+ cpptestcli -data out -localsettings local.conf -bdf build/sca/cpptest/cpptestscan.bdf -config " builtin://Recommended Rules" -report out/report
37+
38+
39+ You might need to set ``bdf.import.c.compiler.exec ``, ``bdf.import.cpp.compiler.exec ``, and
40+ ``bdf.import.linker.exec `` to the toolchain :ref: `west build <west-building >` used.
Original file line number Diff line number Diff line change @@ -64,3 +64,4 @@ The following is a list of SCA tools natively supported by Zephyr build system.
6464 codechecker
6565 sparse
6666 gcc
67+ cpptest
You can’t perform that action at this time.
0 commit comments