diff --git a/cmake/kconfig.cmake b/cmake/kconfig.cmake index 1633c90bd66..e59a32e85d1 100644 --- a/cmake/kconfig.cmake +++ b/cmake/kconfig.cmake @@ -94,7 +94,7 @@ get_cmake_property(cache_variable_names CACHE_VARIABLES) foreach (name ${cache_variable_names}) if("${name}" MATCHES "^CONFIG_") # When a cache variable starts with 'CONFIG_', it is assumed to be - # a CLI Kconfig symbol assignment. + # a Kconfig symbol assignment from the CMake command line. set(EXTRA_KCONFIG_OPTIONS "${EXTRA_KCONFIG_OPTIONS}\n${name}=${${name}}" ) diff --git a/scripts/sanitycheck b/scripts/sanitycheck index b66cc3fad71..48697145172 100755 --- a/scripts/sanitycheck +++ b/scripts/sanitycheck @@ -1334,7 +1334,8 @@ class MakeGenerator: if len(ti.test.extra_configs) > 0 or options.coverage: args.append("OVERLAY_CONFIG=\"%s %s\"" %(overlays, - os.path.join(ti.outdir, "overlay.conf"))) + os.path.join(ti.outdir, + "sanitycheck", "testcase_extra.conf"))) if ti.test.type == "unit" and options.enable_coverage: args.append("COVERAGE=1") @@ -1885,8 +1886,13 @@ class TestInstance: return build_only def create_overlay(self, platform): - file = os.path.join(self.outdir, "overlay.conf") - os.makedirs(self.outdir, exist_ok=True) + # Create this in a "sanitycheck/" subdirectory otherwise this + # will pass this overlay to kconfig.py *twice* and kconfig.cmake + # will silently give that second time precedence over any + # --extra-args=CONFIG_* + subdir = os.path.join(self.outdir, "sanitycheck") + os.makedirs(subdir, exist_ok=True) + file = os.path.join(subdir, "testcase_extra.conf") with open(file, "w") as f: content = ""