zephyr/subsys
Torsten Rasmussen 7a65bdbd64 cmake: kconfig: introduce dedicated unit testing board
This commit introduces a dedicated unit testing board.

Today, a dedicated Zephyr unit testing scheme exists but is different
from how a Zephyr build generally works.

For example Kconfig is not possible, resulting on various different
hacks to pass Kconfig settings from test cases / testcase.yaml through
CMake to the code.
Some directly as compile definitions, some as header files with forced
inclusion on sources, some with wrapper flags which again results in
different define being enabled. There is even cases where a second
forced header inclusion undefines previous defines.

Unit test often does a manual check for the right boards, like this:
> if (NOT BOARD STREQUAL unit_testing)
>    message(FATAL_ERROR "This project can only be used with...")
> endif()

Introducing a dedicated unit_testing board under `tests/root` allows
us to use Kconfig in unit test samples, and thus proper `prj.conf` and
extra Kconfig fragments.
Generation of autoconf.h so the overall architecture follows regular
Zephyr builds.

Proper and uniform error messages when invalid board is selected.

The unit_testing board and arch is located under: `subsys/testsuite` so
that it is only available when find_package(Zephyr COMPONENTS unittest)
is used, and not available for regular Zephyr builds.

Kconfig generates autoconf.h which is applied as compile flag to
test binary which means that kconfig defines placed in ztest.h can now
be removed.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-18 14:29:14 +02:00
..
bluetooth Bluetooth: Host: Add CONFIG_BT_PRIVACY_RANDOMIZE_IR 2022-08-18 13:04:35 +02:00
canbus drivers: can: remove z prefix from public CAN API types 2022-08-18 10:19:29 +02:00
console subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
cpp cpp: Include additional contents in <cstddef> 2022-06-23 09:12:33 +02:00
debug lib: os: assert: Add unreachable path hint for assertion failure 2022-08-10 14:32:36 +02:00
demand_paging different subsystems: use unsigned int for irq_lock() 2022-07-14 14:37:13 -05:00
dfu dfu: Fix write block size check on, probably, incorrect device 2022-08-18 12:51:20 +02:00
disk subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
emul emul: emul_sbs_gauge: Fix compile 2022-08-17 12:47:16 -05:00
fb scripts: move gen_cfb_font_header.py to scripts/build 2022-07-12 10:03:45 +02:00
fs shell: typos 2022-08-18 12:25:39 +02:00
ipc ipc_service: Add ipc_service_deregister_endpoint function 2022-08-18 12:32:21 +02:00
jwt subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
logging kconfig: logging: Add LOG_MIPI_SYST_ARGS_BUFFER_SIZE option. 2022-08-17 12:07:08 +02:00
lorawan lorawan: upgrade to LoRaMAC-node v4.6.0 2022-08-03 05:02:57 +01:00
mgmt subsys/mgmt/hawkbit: Set ai_socktype if IPV4/IPV6 2022-08-18 11:33:38 +00:00
modbus modbus: remove the use of DT_INST_LABEL and DT_PROP(inst, label) 2022-08-11 09:39:24 -07:00
net tls_credentials: add Trusted Credential storage backend 2022-08-18 12:33:07 +02:00
pm pm: policy: allow multiple subscribers to latency changes 2022-08-03 11:19:17 +02:00
portability different subsystems: use unsigned int for irq_lock() 2022-07-14 14:37:13 -05:00
random subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
rtio include: fix the remaining legacy #include paths 2022-08-02 16:41:41 +01:00
sd sd: sdmmc: wait before sending second OCR 2022-08-18 12:49:03 +02:00
settings fcb_settings: Use weak function to get storage flash area 2022-08-18 12:31:43 +02:00
shell shell: kernel: fix sleep command 2022-08-03 18:47:03 +02:00
stats subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
storage storage: flash_map: fix incomplete type 2022-08-18 11:20:26 +02:00
task_wdt include: add more missing zephyr/ prefixes 2022-05-27 15:20:27 -07:00
testsuite cmake: kconfig: introduce dedicated unit testing board 2022-08-18 14:29:14 +02:00
timing subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
tracing kernel: pipes: rewrite pipes implementation 2022-08-17 19:31:25 +02:00
usb usb: Increase mass storage stack size when SD stack is enabled 2022-08-17 12:09:17 +02:00
CMakeLists.txt dfu: fixup conditional CMake include 2022-08-05 15:14:40 +02:00
Kconfig rtio: Real-Time Input/Output Stream 2022-06-28 13:53:13 -04:00