This is required if boards make use of such definition in their Kconfig
files. In Kconfig.board.v2, only `boards/Kconfig.v2` is loaded, but
BOARD_REVISION is part of `boards/Kconfig`, which can't be loaded in this
context.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add several examples for `upload_test_results_es.py` script usage
with ElasticSearch index map files for the following use cases:
* Twister test results.
* Twister test results with recordings.
* Memory Footprint data (`twister-footprint.json`).
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
The script was only looking at the Zephyr base repository and failing to
look for soc roots e.g. in other modules.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
With the requirement in #78316 for Zephyr modules to always define
ZEPHYR_<name>_MODULE Kconfig setting then there is no longer a need
for this commit. Simplify check_compliance by reverting ths commit.
This reverts commit 35e28e6315.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Some dict.get() calls did not use a TwisterStatus
as a default value, thus using a NoneType where
TwisterStatus should appear.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
ReStructuredText can sometimes be tricky to get right, especially for
folks that might be more familiar with Markdown.
This adds a Sphinx/RST linter to the compliance check script to help
catch common issues that can easily go unnoticed and cause rendering
issues.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Multiple improvements of the `upload_test_results_es.py` script:
* JSON objects flattening.
This feature allows `twister.json` file preprocessing to simplify
its Elasticsearch index structure for complex hierarhical objects,
for example with memory footprint, or code coverage data.
A new command line option `--flatten` is added to change testsuite data
structure in regard of one of its list objects: either `testcases` or
`recording`, so each item there becomes an independent data record
inheriting all other testsuite properties, whereas the children
object's properties are renamed with the parent object's name
as a prefix: 'testcases_' or 'recording_' respectively.
Only one testsuite property can be flattened this way per index upload.
Other children objects will be treated accorging to the index structure.
Related new command line options (with help text explanations):
`--flatten-dict-name`,
`--flatten-list-names`,
`--flatten-separator`,
`--transpose-separator`,
`--escape-separator`
* A new command line option `--transform` is added to allow regexp group
parsing in string propertites extracting additional derived properties.
* A new command line option `--exclude` is added to exclude testsuite
properties not needed to store at Elasticsearch index.
* Branch name `--run-branch` and Workflow ID `--run-workflow` command
line options as additional key fields to allow data from different
branches, workflows and triggering events in the same index.
* A new command line option `--map-file` is added to apply
an explicit index structure to the `twister.json` input data.
* Add bulk operation timeout parameter for heavy/long uploads.
Other changes:
* batch upload error handling and logging;
* inline documentation improvements;
* some corner case fixes on empty objects.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
If a diff only has added or removed lines we need to match both '-' and '+'
characters in the hunk context.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Re-run issue check when a PR is updated, i.e. when someone adds
'Fixes...` to the PR body.
This is mostly for release branches and has no effect on main branch.
Also, add concurrency check in the workflow.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Update check_compliance to handle auto defined ZEPHYR_<name>_MODULE
Kconfig symbols.
check_compliance runs three levels of Kconfig check.
A basic and a full, both which uses the generated Kconfig.modules
created according to Zephyr modules present.
A Kconfig check where no Zephyr modules are sourced. This check ensures
that Zephyr Kconfig tree doesn't refer to Kconfig symbols defined in
Zephyr module's local Kconfig trees.
However, there are a few auto generated symbols which are allowed,
such as: `ZEPHYR_<name>_MODULE` and `ZEPHYR_<name>_MODULE_BLOBS`.
Therefore, when testing no blobs, filter the generated Kconfig.modules
file, so that no sourcing of extra Kconfig files are performed but
lines defining `ZEPHYR_<name>_MODULE` and `ZEPHYR_<name>_MODULE_BLOBS`
are preserved.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The clang-format check outputs a git diff with surrounding context. It
naively removed the first and last 3 lines, but this does not work if
there are less lines.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Do not try to format each single failure, this will take too long to
process and will run for hours and spam GH.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Modify the condition in the parse_testplan
function to align with the changes in the Status class.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
For regexes such as `CONFIG_DEBUG_(OPTIMIZATIONS|INFO)` and
to be able to use `.*` as this syntax is used in the Kconfig search.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
In order to reduce excessive false positives for Coding
Guidelines checks in CI, maintain a list of paths that are
marked "safe" for reserved names to be implemented or declared.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add a new compliance check that reports any clang-format issues on
the git diff and prints a warning.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Driver for Nordic nRF70 Wi-Fi6 companion chipset, depends on
hal_nordic/nrf_wifi for OS agnostic part of the driver.
This supports (Q)SPI interface to communicate from host to chip.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Current implementation will not work if comits were not provided.
ie. use case with list of changed files will fail as args.commits is None.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Ignore changes to the CANopen program download west runner in CI.
This script is only executed when performing a DFU using the CANopen
protocol via CAN, which is never triggered in CI anyways.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
These clock selection Kconfigs should have been deprecated for
more than 2 releases, remove them:
- `CONFIG_COUNTER_RTC_STM32_CLOCK_SRC`
- `CONFIG_COUNTER_RTC_STM32_CLOCK_LSI`
- `CONFIG_COUNTER_RTC_STM32_CLOCK_LSE`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Since b53a792ff0 Zephyr has the ability to define tristate Kconfig
options. When a tristate option FOO is selected as a "module", this
results in autoconf.h defining CONFIG_FOO_MODULE, not CONFIG_FOO.
This patch allows the check_compliance script to also accept references
to a Kconfig symbol ending in _MODULE if the prefix is defined.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
With many tests having 10s or scenarios and variants, anytime we make a
change to a test right now, we end up building all scenarios on all
platforms which ends up in multiple 10s of the thousands of instances
that need to run on 30 or 40 runners blocking CI for hours. We do not
really need that, a test needs to be smart about its coverage and not
rely on boiling the ocean to catch, mostly build errors that are
platform specific.
Change this to do the normal coverage we get on push events.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Handle MPI and root manifest for radio core separately from the main
build system logic.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Handling of board changes was broken and did not support v2 boards, fix
this to optimize CI execution on localized changes of board files.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The coverage_analysis.py while generating report, duplicates
files and functions of components.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
In twister, applying quarantine is a part of apply_filters() function.
However, this function is not called when --load-test is used.
Therefore, if one wants to use quarantines in combination with
dynamic scope from the test_plan.py script, one has to pass such
info through the script.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Adding a Kconfig and a header file to control which PSA features
are to be used from MbedTLS:
- new kconfig symbols are placed in a separate header file
(Kconfig.psa) and are guarded by MBEDTLS_PSA_CRYPTO_CLIENT. The
reason for this is that TLS/X509 can either rely on PSA functions
provided by MbedTLS (when MBEDTLS_PSA_CRYPTO_C is defined) or
TFM (when BUILD_WITH_TFM is selected). Therefore we could
not make these new Kconfigs depending on MBEDTLS_PSA_CRYPTO_C.
- by default all PSA symbols are enabled, but they can be
disabled by respective Kconfigs in order to reduce the image
size.
- the new header file (config-psa-generic.h) mimics what
config-tls-generic.h does for MbedTLS builtin symbols: it
enables a build symbol for every Kconfig one. The name is
kept identical in the 2 cases (a part from the initial CONFIG_
in order to simplify the mechanism).
- MBEDTLS_PSA_CRYPTO_CONFIG is finally enabled whenever there
is any PSA crypto provider (either MBEDTLS_PSA_CRYPTO_C or
TFM)
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Allow to provide from CLI, threshold value for number of test case roots
selected for execution base on changed files.
When such threshold will be exceeded, full scope will be executed.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Switch from plain text to JSON output in the pylint compliance check in
order to handle multi-line messages, which were so far being dropped
by the regex.
Fixes#68037.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add mps2/an385 and unit_testing to the simulator
criteria while parsing testsuites. Now the testsuit
will count as a simulator only where the platform
is quemu*, native*, unit_testing, mps2/an385.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
Take into account the Kconfig symbols in tests and samples that are
defined using the logging template.
This avoid using the `UNDEF_KCONFIG_WHITELIST` for those symbols.
Update the list to remove the symbols that were added for that reason.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>