To support checking for sorted blocks of multi-line text add
an optional regex pattern for the KeepSorted compliance check.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The production version of the nRF54H20 SoC is now available, so remove
the initial Engineering B (EngB) preview version.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Some auto formatters will wrap long lines of code and insert newlines
that are part of function decls outside of arguments. This change strips
out all newlines so syscall typename regex function as expected.
Signed-off-by: Mark Inderhees <markind@meta.com>
This patch adds support for the size_t %z format specifier to the
dictionary parser.
It's the correct format to use for size_t types in modern C,
but it's not supported in python directly.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Fix wrong reporting about where testcases were executed.
We have:
INFO - 1130 of 1130 executed test cases passed (100.00%) on 0 out of
total 860 platforms (0.00%).
which is obviously wrong.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
suite stats were not correct, a mixup between skipped and filtered
suites was leading to inconsistent numbers. This is now fixed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not report status issues as errors, very confusing and developer end
up looking at the wrong thing, instead, treat those as warnings and
count them and report them at the end.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
It is confusing to report filtered testcases as testcases that were
selected but not exexuted. If they are filtered, then there should not
be considered as selected.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
custom simulator needs an executable defined, or else we will have tests
marked runnable with nothing to run them which would result in an
error/warning.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
On nRF54H and nRF92, booting certain cores requires programming a UICR,
which is normally generated using nrf-regtool. This should be considered
an optional dependency, because we do not wish to force non-Nordic users
to install it just to work with Zephyr, or just for build-only tests.
When nrf-regtool is not installed, a CMake warning will be displayed,
but people ignore warnings all the time. As the last line of defense,
check for missing UICR in the nrfutil flash runner, to prevent our users
from unintentionally programming unbootable firmware. Show a fatal error
specifically if CONFIG_NRF_REGTOOL_GENERATE_UICR=y, yet no UICR exists.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
[1] was introduced to get more valuable answers from
the PropertySpec.path API, which is supposed to tell
in which file the property's specification was "last modfied".
Further work on related issues [2] showed that the
approach chosen in [1] is dead end: we need to first rethink
how bindings (and especially child-bindings) are initialized.
[1] edtlib: fix last modified semantic in included property specs
[2] edtlib: Preserve paths of properties from included child bindings
See also: #65221, #78095
This reverts commit b3b5ad8156.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Use-case "B includes I includes X":
- X is a base binding file, specifying common properties
- I is an intermediary binding file, which includes X
without modification nor filter
- B includes I, filtering the properties it chooses
to inherit with an allowlist or a blocklist
Check that the properties inherited from X via I
are actually filtered as B intends to,
up to the grandchild-binding level.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
This unit test was added to cover the change introduced by [1].
Further work on related issues [2] showed that the chosen approach
is dead end.
We're reverting all changes made in [1].
[1] edtlib: fix last modified semantic in included property specs
[2] edtlib: Preserve paths of properties from included child bindings
See also: #65221, #78095
This reverts commit 70eaa61cb0.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
This unit test was added specifically to cover a regression
reported by the CI while working on [1].
Further work on related issues [2] showed that:
- [1] and [2] are dead end: we need to first rethink
how bindings (and especially child-bindings) are initialized
- the inclusion mechanism supported by Zephyr deserves more systematic
testing in edtlib if we want to work with confidence
The approach we choose is to:
- revert all changes made in [1]
- from there, systematically add unit tests as we address
the issues we identified (or the additional features we need)
one after the other
[1] edtlib: fix last modified semantic in included property specs
[2] edtlib: Preserve paths of properties from included child bindings
See also: #65221, #78095
This reverts commit 33bb3b60d9.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
A recent commit changed all references to the global 'west.log' instance
(now deprecated) to the new WestCommand logging API, but another PR
merged in the same period added an extra instance that is now causing CI
to fail. Convert this last reference to the new API.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The 'west build' command does not know about conditional flags (in the
format 'type:value:CONFIG_FOO=bar') in the 'extra_configs' argument of
Twister testcase.yaml files, and currently converts them to malformed
arguments that are silently ignored by cmake.
This change adds a check to 'west build' to clearly warn the user if the
'extra_configs' list contains conditional flags and provide a hint on
how to add them to the CMake command line.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Fix Twister TestCase statuses left not assigned ('NONE') in these 'NOTRUN'
situations:
* a test suite has `integration platform` which is not available to run.
* `--cmake-only` execution.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Twister shall now verify that the user does not
use an obsolete Python version. If user's Python
is deemed too old, it will raise a relevant error.
This check will also happen when running Twister
via west.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Remove deprecated _ENUM_TOKEN and _ENUM_UPPER_TOKEN. These are
deprecated for over three years by now.
Signed-off-by: Joel Hirsbrunner <jhirsbrunner@baumer.com>
When using the --build-only into --test-only
Twister setup, NOTRUN statuses were not properly rerun.
Now they are properly run again if runnable.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
ExecutionCounter has been expanded and now hold i.a.
more information on the statuses of TestCases.
This information is now incorporated in relevant summaries
- runner.py and reports.py.
Layout of those was changed to present that
and previous information in a clear and concise way.
TestInstance execution counter now is more intuitive.
Instances filtered out before running are no longer included there.
Retries now properly reset the counter.
TestCases with None and other incorrect final statuses
are logged as errors, but do not
exit Twister with a nonzero exit code.
This is because None statuses, although incorrect,
are currently common.
Inconsistent spacing in ERROR and FAILED fixed.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
scripts: Dmitri fix
Fix of a problem noticed by Dmitri
Removed unnecessary additional spaces when
printing FAILED and ERROR status.
Now TwisterStatus.get_color is used more.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
As per its creators, CMake is written with a capital "M".
The initial reason for this change is that I want Twister to print
"ERROR : CMake build failure" instead of "ERROR : Cmake build failure".
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
the script shows an incorrect file name, I check the wrong file first, then
I find the script did not print the current reading file name.
Fix this to prevent others from wasting their time on this.
The new error message:
```
[1/179] Generating syscalls.json, struct_tags.json
Error decoding zmk/.../altera_msgdma.c (included in zephyr/.../ethernet.c)
```
Signed-off-by: Sa Sasu <i@sasa.su>
Set soc_root using Path to avoid wrong generated path in the list of
soc_roots and other roots read from module.yml file
Fixes#80531
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Cleanup notrun tests with the -M option. This is used in the weekly
build and fails because devices will run out of space.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In the `Board` class, the `dir` member was renamed to `directories`,
both to indicate that it is now a list (in HWMv2 with board extensions)
and to reflect the addition of the `BOARD_DIRECTORIES` CMake variable.
Considering that the build system also keeps the `BOARD_DIR` variable,
and for the sake of backwards compatibility and brevity, it should be
useful to retain `Board.dir` in Python as well, symmetrically.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Removes validating the qualifiers for flash run once configuration
as files may be present that contain information for qualifiers
that are not present in a single repository but are spaced out in
other repositories, or might be optional
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds an optional priority parameter to the flash runner run once
configuration which allows for deciding upon which file should
ultimately be used
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes: #72374
Support extending an existing SoC with new CPU clusters.
This commit introduces the following changes to allow an SoC to be
extended out-of-tree.
The SoC yaml schema is extended to support an extend field which
will be used to identify the SoC to be extended with extra CPU clusters.
A SoC 'a_soc' can be extended like this:
> socs:
> extend: a_soc
> cpuclusters:
> - name: extra_core
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Fixes: #69548
Support extending an existing board with new board variants.
This commit introduces the following changes to allow a board to be
extended out-of-tree.
The board yaml schema is extended to support an extend field which
will be used to identify the board to be extended.
A board 'plank' can be extended like this:
> board:
> extend: plank
> variants:
> - name: ext
> qualifier: soc1
For the rest of the build system this means that there is no longer a
single board directory.
The existing CMake variable BOARD_DIR is kept and reference the
directory which defines the board.
A new CMake variable BOARD_DIRECTORIES provides a list of all
directories which defines board targets for the board.
This means the directory which defines the board as well as all
directories that extends the board.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
if alias or shorthand name is provided on the command line, we need
convert this to complete target name for the filters to work.
Fixes#80332
Signed-off-by: Anas Nashif <anas.nashif@intel.com>