zephyr/cmake
Marc Herbert c7633de038 sanitycheck: fix priority of --extra-args=CONFIG_ over testcase.yaml
sanitycheck takes any "extra_config" list found in the testcase.yaml
file and generates an "overlay" file from it. This file is placed in
the per-test build directory and passed to cmake/kconfig.cmake through a
-DOVERLAY_CONF= option set in the (also) generated sanity-out/Makefile.

This commit moves this generated config overlay to a subdirectory one
level down from the build directory, otherwise kconfig.cmake picks it
up *twice*: once from the -DOVERLAY_CONF= option already mentioned above
and a second time because kconfig.cmake scans the build directory and
blindly picks up ALL files ending with .conf[*]. The second pickup is
problematic because kconfig.cmake currently gives it the top precedence,
even higher than anything the user espressed with --extra-args=CONFIG_*

Here's a quick and simple demonstration of the issue fixed by this
commit:

  cd $ZEPHYR_BASE/samples/net/sockets/net_mgmt/
  sanitycheck -T. -p qemu_x86 -b -v # --extra-args=CONFIG_USERSPACE=y|n
  grep CONFIG_USERSPACE $(find sanity-out/ -name .config)

  .net_mgmt.kernelmode/zephyr/.config: # CONFIG_USERSPACE is not set
    .net_mgmt.usermode/zephyr/.config: CONFIG_USERSPACE=y

  grep 'Merged configuration' $(find sanity-out/ -name build.log)

Without this commit, attemps to override anything with
--extra-args=CONFIG_ are silently dropped on the floor.

For more background this issue was found while using the recipe in
commit message 4afcc0f8af

[*] picking up all .conf files is debatable but a much bigger debate
with backward compatibility implications. This small fix makes
absolutely zero difference to anyone or anything not using sanitycheck.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-07-09 19:16:30 -07:00
..
app
backports
compiler cmake: toolchain_cc_imacros: don't use the long argument form 2019-07-03 06:09:16 -04:00
emu cmake: Set NO_QEMU_SERIAL_BT_SERVER when CONFIG_BT_NO_DRIVER is set 2019-06-24 22:36:59 +02:00
flash
ide
linker/ld
reports
toolchain cmake: check ZEPHYR_SDK_INSTALL_DIR is set 2019-07-04 09:24:57 -04:00
usage
util
boards.cmake
ccache.cmake
cfb.cmake
dts.cmake
extensions.cmake cmake: remove spurious IS_ABSOLUTE logic in zephyr_sources() 2019-07-02 19:03:49 -04:00
extra_flags.cmake
fpu-for-gcc-m-cpu.cmake
gcc-m-cpu.cmake
generic_toolchain.cmake cmake: Toolchain abstraction: Allow for out-of-tree cmake includes 2019-07-04 12:50:23 +02:00
git.cmake
hex.cmake
host-tools.cmake
kconfig.cmake sanitycheck: fix priority of --extra-args=CONFIG_ over testcase.yaml 2019-07-09 19:16:30 -07:00
kobj.cmake
pristine.cmake
python.cmake
target_toolchain.cmake cmake: Toolchain abstraction: Allow for out-of-tree cmake includes 2019-07-04 12:50:23 +02:00
version.cmake
zephyr_module.cmake