File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 2
2
#
3
3
# Copyright (c) 2023, Basalte bv
4
4
5
+ include (boards )
6
+ include (git )
7
+ include (extensions )
8
+ include (west )
9
+
5
10
find_program (CODECHECKER_EXE NAMES CodeChecker codechecker REQUIRED )
6
11
message (STATUS "Found SCA: CodeChecker (${CODECHECKER_EXE} )" )
7
12
@@ -17,14 +22,24 @@ zephyr_get(CODECHECKER_PARSE_SKIP)
17
22
zephyr_get (CODECHECKER_STORE )
18
23
zephyr_get (CODECHECKER_STORE_OPTS )
19
24
zephyr_get (CODECHECKER_STORE_TAG )
20
- zephyr_get (CODECHECKER_TRIM_PATH_PREFIX )
25
+ zephyr_get (CODECHECKER_TRIM_PATH_PREFIX MERGE VAR CODECHECKER_TRIM_PATH_PREFIX WEST_TOPDIR )
26
+
27
+ # Get twister runner specific variables
28
+ zephyr_get (TC_RUNID )
29
+ zephyr_get (TC_NAME )
21
30
22
31
if (NOT CODECHECKER_NAME )
23
- set (CODECHECKER_NAME zephyr )
32
+ if (TC_NAME )
33
+ set (CODECHECKER_NAME "${BOARD}${BOARD_QUALIFIERS} :${TC_NAME} " )
34
+ else ()
35
+ set (CODECHECKER_NAME zephyr )
36
+ endif ()
24
37
endif ()
25
38
26
39
if (CODECHECKER_ANALYZE_JOBS )
27
40
set (CODECHECKER_ANALYZE_JOBS "--jobs;${CODECHECKER_ANALYZE_JOBS} " )
41
+ elseif (TC_RUNID )
42
+ set (CODECHECKER_ANALYZE_JOBS "--jobs;1" )
28
43
endif ()
29
44
30
45
if (CODECHECKER_CONFIG_FILE )
@@ -33,6 +48,11 @@ endif()
33
48
34
49
if (CODECHECKER_STORE_TAG )
35
50
set (CODECHECKER_STORE_TAG "--tag;${CODECHECKER_STORE_TAG} " )
51
+ else ()
52
+ git_describe (${APPLICATION_SOURCE_DIR} app_version )
53
+ if (app_version )
54
+ set (CODECHECKER_STORE_TAG "--tag;${app_version} " )
55
+ endif ()
36
56
endif ()
37
57
38
58
if (CODECHECKER_TRIM_PATH_PREFIX )
You can’t perform that action at this time.
0 commit comments