Commit graph

22 commits

Author SHA1 Message Date
Yuval Peress 4efa11ebf7 bbram: Add tests
Add emulation testing for it8xxx2, npcx, and mcp7940n. The test is made
to be generic and uses the backend API in order to verify both read and
write functionality. Additional tests are made for the API's limits when
reading/writing out of bounds.

Fixes #65018

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-12 09:59:31 +01:00
Alberto Escolar Piedras 5c7eae6745 tests/drivers/bbram: Switch to native_sim
Switch from native_posix to native_sim as default
test platform, switch overlays to native_sim.
For the HW test, filter whole posix arch to speed
up twister run.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-22 09:53:20 +01:00
Anas Nashif 345735d0a8 tests: remove CONFIG_ZTEST_NEW_API in all tests
Remove all usage of CONFIG_ZTEST_NEW_API from tests and sample as this
is now enabled by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Anas Nashif dd743c97a4 tests: drivers: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Johan Lafon a4e610a4ee tests: drivers: bbram: add a second stm32 test entry
BBRAM can now depend on the new RTC driver implementation instead of the
old counter based one. This adds the corresponding test scenario.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-20 11:34:52 +01:00
Anas Nashif 0064b6e8b6 tests: samples: cleanup test tags, add integration_platforms
Use integration platforms and sanitize tags.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-02 04:47:06 -04:00
Gerard Marull-Paretas 93b63df762 samples, tests: convert string-based twister lists to YAML lists
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-10 09:52:37 +02:00
Mark Watson 6f9559c88e tests: drivers: bbram: refactoring
Refactored to use a single prj.conf file.

Fixes #52754

Signed-off-by: Mark Watson <markus.c.watson@gmail.com>
2022-12-29 17:40:29 +01:00
Patryk Duda 1d2a275780 tests: drivers: bbram: Test BBRAM on STM32 devices
This patch makes possible to check if STM32 boards compile with BBRAM
support enabled.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-08 16:47:09 +09:00
Michał Barnaś dae8efa692 ztest: remove the obsolete NULL appended to zassert macros
This commit removes the usage of NULL parameter as message in
zassert_* macros after making it optional

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-09-09 07:05:38 -04:00
Gerard Marull-Paretas a202341958 devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).

Automated using:

```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Kumar Gala ae7f349367 tests: drivers: bbram: Filter on dt_compat
Add devicetree compatiable filter for test cases.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-16 18:08:42 -05:00
Kumar Gala 718bccd563 tests: drivers: bbram: remove invalid overlay
qemu_riscv32.overlay adds a device node for the ite,it8xxx2-bbram
which doesn't make any sense since for qemu_riscv32.  Just remove
the file.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-16 18:08:42 -05:00
Kumar Gala 1bc0448564 tests: drivers: bbram: remove conf file setting of bbram drivers
Now that bbram drivers are enabled based on devicetree we can
remove any cases of them getting enabled by *.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-16 18:08:42 -05:00
Fabio Baltieri def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Kumar Gala b97a9ee21c tests: drivers: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from tests.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-22 16:44:08 +00:00
Meng xianglin 7f0fb635ec tests: bbram: move to new ztest API
test case in bbram dosen't use ztest framework, but test cases in
emul in bbram use it.

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2022-07-11 10:59:49 +02:00
Kumar Gala a40a0e9294 tests: drivers: bbram: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:08:14 +02:00
Gerard Marull-Paretas ade7ccb918 tests: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:02:14 +02:00
Yuval Peress 74b9a607b4 drivers: bbram: Add it8xxx2 BBRAM driver implementation
Note that the it8xxx2 does not support a status register so that
functionality is omitted.

This change also adds driver tests that build both the npcx and it8xxx2
drivers.

Signed-off-by: Yuval Peress <peress@chromium.org>
2021-08-30 11:35:23 -04:00
Torsten Rasmussen 1cccc8a8fe cmake: increase minimal required version to 3.20.0
Move to CMake 3.20.0.

At the Toolchain WG it was decided to move to CMake 3.20.0.

The main reason for increasing CMake version is better toolchain
support.

Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-20 09:47:34 +02:00
Yuval Peress 268f9bf163 nuvoton: battery-backed ram
Add bindings and entry for the battery-backed ram in the nuvoton
npcx. This commit is an upstream port of
https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/cros_bbram/nuvoton,npcx-cros-bbram.yaml;l=1;drc=e9af813c36b7b411bf2a01cbc1b09d5fdec49b8a

Along with a bit of cleaning up and an emulator.

Signed-off-by: Yuval Peress <peress@chromium.org>
2021-08-07 20:32:33 -04:00