zephyr/scripts
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
..
build code_relocation: Fix Warning 2023-02-08 12:11:14 +01:00
checkpatch
ci scripts: ci: check_compliance: Ignore undefined CONFIG_CMD_CACHE 2023-02-24 18:11:56 +01:00
coccinelle
coredump treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
dts edtlib: extract _slice() code to new helper module 2023-02-27 17:44:45 +01:00
footprint treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
generate_usb_vif treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
gitlint scripts: zephyr_commit_rules: improve commit error messages 2023-02-08 15:03:56 -08:00
kconfig scripts: kconfig: add function to determine if GPIO hogs are enabled 2023-01-27 14:38:52 -08:00
logging/dictionary treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
net scripts: net: add enumerate_http_status.py 2022-10-12 09:02:21 -04:00
pylib twister: Fields for Kconfig and DT overlay files in testcase.yaml 2023-03-01 16:52:01 -05:00
pylint/checkers scripts: pylint: Add argument parser abbreviation checker 2023-01-26 20:12:36 +09:00
release treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
schemas/twister twister: Fields for Kconfig and DT overlay files in testcase.yaml 2023-03-01 16:52:01 -05:00
support treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
tests twister: Fields for Kconfig and DT overlay files in testcase.yaml 2023-03-01 16:52:01 -05:00
tracing tracing: scripts: Fix spelling 2023-02-08 01:09:31 +09:00
utils build: drop LEGACY_INCLUDE_PATH support 2023-02-21 15:06:48 +01:00
west_commands west/sign: Move from using partition label property 2023-02-22 09:32:51 -08:00
.gitignore
checkpatch.pl checkpatch: update --exclude docs 2022-12-01 15:48:30 +01:00
checkstack.pl
coccicheck
dump_bugs_pickle.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
gen_gcov_files.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
get_maintainer.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
github_helpers.py
list_boards.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
make_bugs_pickle.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
requirements-base.txt
requirements-build-test.txt
requirements-compliance.txt scripts: compliance: add support for YAMLLint 2023-01-04 17:29:23 +01:00
requirements-doc.txt doc: Do not use Sphinx 5.2.0.post0 2022-09-25 10:37:32 +02:00
requirements-extras.txt clang-format: Enable InsertBraces option 2022-12-20 22:51:57 +01:00
requirements-run-test.txt soc: xtensa: tools: remove dependency of netifaces package 2022-08-16 22:51:53 -07:00
requirements.txt
series-push-hook.sh
set_assignees.py scripts: set_assignee: don't skip assignment on too many labels 2023-01-26 14:57:29 -05:00
spelling.txt
tags.sh
twister twister: move main to twisterlib/twister_main.py 2023-01-13 15:39:04 -08:00
valgrind.supp
west-commands.yml west: west twister integration 2023-01-13 15:39:04 -08:00
zephyr_module.py cmake: implement build infrastructure for supporting SCA tools. 2023-01-27 20:28:58 +09:00