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 cmake: warn if inconsistency between CMAKE_SOURCE_DIR and ZEPHYR_BASE 2019-06-11 12:57:18 -04:00
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 cmake: delete obsolete deprecation checks 2019-06-07 13:43:51 +02:00
ide
linker/ld docs: fix misspelling across the tree 2019-06-19 15:34:13 -05:00
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 generated/cfb_font_dice.h: don't leak absolute paths in comment 2019-06-19 08:40:59 -04:00
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 cmake: fix regex for west version check in host-tools.cmake 2019-05-21 08:19:09 -04:00
kconfig.cmake sanitycheck: fix priority of --extra-args=CONFIG_ over testcase.yaml 2019-07-09 19:16:30 -07:00
kobj.cmake cmake: Fix missing dependency 2019-05-16 07:47:18 -05:00
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