From 1aacb6e2cfcc6d03ac7cc4395b6d9ed5008d40a3 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 26 Jun 2020 12:12:43 +0200 Subject: [PATCH] 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. --- tools/find_build_apps/common.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/find_build_apps/common.py b/tools/find_build_apps/common.py index ddc16093a..81b61859a 100644 --- a/tools/find_build_apps/common.py +++ b/tools/find_build_apps/common.py @@ -25,6 +25,10 @@ SDKCONFIG_TEST_OPTS = [ "EXCLUDE_COMPONENTS", "TEST_EXCLUDE_COMPONENTS", "TEST_COMPONENTS", +] + +# These keys in sdkconfig.defaults are not propagated to the final sdkconfig file: +SDKCONFIG_IGNORE_OPTS = [ "TEST_GROUPS" ] @@ -268,8 +272,11 @@ class BuildSystem(object): line += "\n" if cls.NAME == 'cmake': m = SDKCONFIG_LINE_REGEX.match(line) - if m and m.group(1) in SDKCONFIG_TEST_OPTS: - extra_cmakecache_items[m.group(1)] = m.group(2) + key = m.group(1) if m else None + if key in SDKCONFIG_TEST_OPTS: + extra_cmakecache_items[key] = m.group(2) + continue + if key in SDKCONFIG_IGNORE_OPTS: continue f_out.write(os.path.expandvars(line)) else: