Skip to content

Commit 1aacb6e

Browse files
committed
tools: build_apps: fix make warning due to unused TEST_GROUPS variable
TEST_GROUPS can be included in the unit-test-app config file, to restrict the list of tests to be executed. However this option is not used at build time, so adding it as a CMake variable along with TEST_COMPONENTS and other options results in a CMake warning. Fix by not passing this variable to CMake, and not including it in the final sdkconfig file.
1 parent 23dd439 commit 1aacb6e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tools/find_build_apps/common.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
"EXCLUDE_COMPONENTS",
2626
"TEST_EXCLUDE_COMPONENTS",
2727
"TEST_COMPONENTS",
28+
]
29+
30+
# These keys in sdkconfig.defaults are not propagated to the final sdkconfig file:
31+
SDKCONFIG_IGNORE_OPTS = [
2832
"TEST_GROUPS"
2933
]
3034

@@ -268,8 +272,11 @@ def build_prepare(cls, build_item):
268272
line += "\n"
269273
if cls.NAME == 'cmake':
270274
m = SDKCONFIG_LINE_REGEX.match(line)
271-
if m and m.group(1) in SDKCONFIG_TEST_OPTS:
272-
extra_cmakecache_items[m.group(1)] = m.group(2)
275+
key = m.group(1) if m else None
276+
if key in SDKCONFIG_TEST_OPTS:
277+
extra_cmakecache_items[key] = m.group(2)
278+
continue
279+
if key in SDKCONFIG_IGNORE_OPTS:
273280
continue
274281
f_out.write(os.path.expandvars(line))
275282
else:

0 commit comments

Comments
 (0)