Commit graph

8 commits

Author SHA1 Message Date
Fabio Baltieri b13052c497 tests: drop CONFIG_ZTEST_NEW_API
This is now gone from upstream and not needed anymore.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-23 14:20:53 +01:00
Gerard Marull-Paretas 96aff8a4ee tests: lib: custom_lib: fix includes
Test was including Kernel for nothing, and missed limits.h
(likely included by Kernel)

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-19 17:41:07 +01:00
Gerard Marull-Paretas b79f9e35d1 tests: lib: custom_lib: use YAML empty dictionary syntax
There is no need to use dummy properties when an empty dictionary
can be used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-19 17:41:07 +01:00
Gerard Marull-Paretas f796cf4752 tests: lib: custom_lib: require CMake 3.20
Zephyr now requires CMake >= 3.20.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-19 17:41:07 +01:00
Carles Cufi 0bfce607ad lib: Fix running twister
Use integration_platforms and invoke twister properly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-19 16:16:52 +01:00
Carles Cufi ede90a457c tests: custom_lib: port to the new ztest API
Align with the latest upstream API.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-19 16:16:52 +01:00
Carles Cufi c7a42920d8 tests: custom_lib: Fix include paths
Align to the new standard that prefixes zephyr/.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-19 16:16:52 +01:00
Gregory Shue 62957ec09f lib: add custom_lib
Enhance the example-application repository with a configurable,
trivial library example and associated test cases.
.
This implementation appears to make no assumptions.
.
This implementation was verified by running the following commands
in an example-application workspace and verifying all tests passed.
  1. `west build -b native_posix -p always example-application/tests/lib/custom_lib/`
  2. `./build/zephyr/zephyr.exe`
  3. `west build -b native_posix -p always example-application/tests/lib/custom_lib/ -- -DCONFIG_CUSTOM_LIB_GET_VALUE_DEFAULT=6`
  4. `./build/zephyr/zephyr.exe`
  5. `zephyr/scripts/twister -T example-application/tests/ \
      -p qemu_cortex_m0`
  6. `cd zephyr/doc && make clean && make` built cleanly.
.
Note that `twister` does not follow the `zephyr/module.yml:tests`
setting to discover tests in modules, so the testcase-root must be
explicitly provided.

Fixes #35177

Signed-off-by: Gregory Shue <gregory.shue@legrand.us>
2022-11-17 15:09:34 +01:00