zephyr/tests
Tristan Honscheid 1eb0452fcb twister: Fields for Kconfig and DT overlay files in testcase.yaml
This is an implementation of issue #48334 and adds support for
specifying additional config and device tree overlays through fields in
the testcase.yaml file, which is more readable than having to cram these
in to `extra_args`.

Consider this example which shows the original and new ways to add
config and DT overlays:

```
common:
  extra_args: "CONF_FILE=a.conf;b.conf
DTC_OVERLAY_FILE=w.overlay;x.overlay OVERLAY_CONFIG=e.conf
UNRELATED=abc"
tests:
  utilities.base64:
    extra_conf_files:
      - "c.conf"
      - "d.conf"
    extra_overlay_confs:
      - "extra_overlay.conf"
    extra_dtc_overlay_files:
      - "y.overlay"
      - "z.overlay"
    extra_configs:
      - CONFIG_SAMPLE=y
    tags: base64
    type: unit
```

The new fields are `extra_conf_files`, `extra_overlay_confs,
`extra_dtc_overlay_files`. Files specified in these sections are appended
to any `CONF_FILE`, `OVERLAY_CONFIG`, or `DTC_OVERLAY_FILE` fields in
`extra_args`, causing the following args being passed in to
`self.run_cmake` at `runner.py:850`:

```
['-DUNRELATED=abc',
 '-DCONF_FILE=a.conf;b.conf;c.conf;d.conf',
 '-DDTC_OVERLAY_FILE=w.overlay;x.overlay;y.overlay;z.overlay',
 '-DOVERLAY_CONFIG=e.conf extra_overlay.conf '
 '<build_dir>/twister/testsuite_extra.conf']
```

These fields can be used in the common or scenario-specific YAML
sections and will be merged in order of least to most specific:

 1. config files extracted from common's extra_args
 2. files listed in common's {extra_conf_files or extra_overlay_confs
    or extra_dtc_overlay_files}
 3. config files extracted from test scenario's extra_args
 4. files listed in test scenario's {extra_conf_files or
    extra_overlay_confs or extra_dtc_overlay_files}

Specifying these files in extra_args now triggers a deprecation warning,
as the direct YAML fields are preferred for readability. They will still
function for now but support will be dropped in the future.  One
testcase.yaml
(`zephyr/tests/cmake/overlays/var_expansions/testcase.yaml`) is
converted to use the new fields. A follow-up PR will convert the
remaining files to the new format.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2023-03-01 16:52:01 -05:00
..
application_development tests: code_relocation: Add additional test cases for library and genex 2023-01-17 18:08:37 +01:00
arch tests: arch: x86: static_idt: Fix test when building with llvm 2023-02-19 20:47:23 -05:00
benchmarks tests: Fix floating point test variants on x86 w/LLVM 2023-02-21 08:25:38 -05:00
bluetooth Tests: Bluetooth: Fix missing CAP broadcast packing field 2023-02-28 10:29:52 +01:00
boards nrf52_bsim: Add tests of EGU 2023-02-22 16:15:20 +01:00
boot yamllint: indentation: fix files in tests/ 2023-01-04 14:23:53 +01:00
cmake twister: Fields for Kconfig and DT overlay files in testcase.yaml 2023-03-01 16:52:01 -05:00
crypto tests: Align zephyr,psa-crypto-rng node names with those used by SoCs 2023-02-07 14:26:18 +01:00
drivers tests: drivers: dma: chen_blen_transfer: add bdma test to nucleo_h743zi 2023-03-01 15:58:27 +01:00
kernel tests: timer_behavior: fix a period drift logic error 2023-02-24 08:29:28 -05:00
lib subsys/mgmt/ec_host_cmd: update directory structure 2023-02-28 10:42:23 +01:00
misc tests: move arm_mpu_regions into tests/arch/ 2023-02-06 10:06:10 +01:00
net tests: net: utils: move to new ztest API 2023-02-24 09:16:27 +01:00
posix tests: posix: headers: Add min_ram to fix nucleo_f103rb compilation error 2023-02-06 10:06:45 +01:00
subsys subsys/mgmt/ec_host_cmd: rework Host Command support 2023-02-28 10:42:23 +01:00
unit tests: unit: test for Power-of-Two utilities 2023-02-22 19:14:05 +01:00
ztest ztest: Remove zexpect API test unnecessary timeout 2023-03-01 16:39:03 -05:00