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 22#
33# Copyright (c) 2023, Basalte bv
44
5+ include (boards)
6+ include (git)
7+ include (extensions)
8+ include (west)
9+
510find_program (CODECHECKER_EXE NAMES CodeChecker codechecker REQUIRED)
611message (STATUS "Found SCA: CodeChecker (${CODECHECKER_EXE} )" )
712
@@ -17,14 +22,24 @@ zephyr_get(CODECHECKER_PARSE_SKIP)
1722zephyr_get(CODECHECKER_STORE)
1823zephyr_get(CODECHECKER_STORE_OPTS)
1924zephyr_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)
2130
2231if (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 ()
2437endif ()
2538
2639if (CODECHECKER_ANALYZE_JOBS)
2740 set (CODECHECKER_ANALYZE_JOBS "--jobs;${CODECHECKER_ANALYZE_JOBS} " )
41+ elseif (TC_RUNID)
42+ set (CODECHECKER_ANALYZE_JOBS "--jobs;1" )
2843endif ()
2944
3045if (CODECHECKER_CONFIG_FILE)
@@ -33,6 +48,11 @@ endif()
3348
3449if (CODECHECKER_STORE_TAG)
3550 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 ()
3656endif ()
3757
3858if (CODECHECKER_TRIM_PATH_PREFIX)
You can’t perform that action at this time.
0 commit comments