This test fails on older python versions (3.10) and only on CI.
Disabling it while we investigate. The test itself verifies inline logs
options, so the functionality test is not impacted.
Tracked in #87769
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Pin python dependencies to hashes and cleanup/unify python setup steps in
various workflows.
We now have one dependency file containing all requirements for github
actions that is managed centrally with hashes. No direct pip installs
are needed in workflow files and everything shall go via the
requirements file.
Pinning to specific version and hashes helps with preventing supply
chain attacks.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As part of relocation, this script matches each source file to its
corresponding object file. This matching is done inside of get_obj_filename
which is called once per source file.
get_obj_filename traverses the entire build directory on every invocation.
This is unnecessary since built object files don't change. On a
sufficiently large project (like mine), this script takes over a minute and
the majority of that time is spent needlessly traversing the build
directory again and again.
Caching the list of object files enables this script to run in less than a
second.
I tested by building my project (which enables the relocation script) and
comparing memory breakdown before / after.
Signed-off-by: Galen Krulce <gkrulce@meta.com>
Remove the redundant keys method when using the
in statement on a dict to fix the Ruff SIM118
warning.
Signed-off-by: James Roy <rruuaanng@outlook.com>
Tweak gen_app_partitions.py to be able to generate cmake linker
generator output as well as ld-script fragments.
Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
Add an empty codeowner file redirecting to MAINTAINERSS.yml file for
clarity and to make some tooling happy.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
need add protection when check with sysbuild filter out
application, the domains is NULL
fixes: #87163
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Quarantine filter was not correctly identifying the simulator name.
Now it uses the simulator name from the Platform object,
ensuring that quarantined tests are properly excluded or verified
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
The section lists that govern whether the ELF
section is recognised or not are out of date.
A programming bug has rendered the unrecognised
section check unrunnable for years.
Thus, the practically dead code of the
unrecognised section check is removed
in this commit.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Make sure we install packages with no issues, some of the issues being
reporting on packages we might install using pip:
Warn: Project is vulnerable to: PYSEC-2019-41 / GHSA-qfc5-mcwq-26q8
Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc
Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56
Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h
Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg
Warn: Project is vulnerable to: PYSEC-2017-74
Warn: Project is vulnerable to: GHSA-55x5-fj6c-h6m8
Warn: Project is vulnerable to: PYSEC-2014-9 / GHSA-57qw-cc2g-pv5p
Warn: Project is vulnerable to: PYSEC-2021-19 / GHSA-jq4v-f5q6-mjqq
Warn: Project is vulnerable to: GHSA-pgww-xf46-h92r
Warn: Project is vulnerable to: PYSEC-2022-230 / GHSA-wrxv-2j5q-m38w
Warn: Project is vulnerable to: PYSEC-2018-12 / GHSA-xp26-p53h-6h2p
Warn: Project is vulnerable to: PYSEC-2024-4 / GHSA-2mqj-m65w-jghx
Warn: Project is vulnerable to: PYSEC-2023-165 / GHSA-cwvm-v4w8-q58c
Warn: Project is vulnerable to: PYSEC-2022-42992 / GHSA-hcpj-qp55-gfph
Warn: Project is vulnerable to: PYSEC-2023-137 / GHSA-pr76-5cm5-w9cj
Warn: Project is vulnerable to: PYSEC-2023-161 / GHSA-wfm5-v35h-vwf4
Warn: Project is vulnerable to: GHSA-3f63-hfp8-52jq
Warn: Project is vulnerable to: GHSA-44wm-f244-xhp3
Warn: Project is vulnerable to: GHSA-56pw-mpj4-fxww
Warn: Project is vulnerable to: GHSA-j7hp-h8jx-5ppr
Warn: Project is vulnerable to: PYSEC-2023-175
Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h
Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6
Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf
Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc
Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f
Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm
Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52
Warn: Project is vulnerable to: GHSA-c6fm-rgw4-8q73
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Removed logger.setLevel(...) from all twister modules, becasue
there should be only one place where twister loggers are configured,
and the log level should be set in that place.
This should be done in twister_main.py in setup_logging function.
Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
Add option to force integration mode on a defined list of tests, for
example tests for sample that are identified with 'sample.'.
A sample per definition shall be tested on documented and supported
platforms listed in the sample documentation. Samples shall not be used
as tests to verify functionality of a feature on all available plaforms
in Zephyr.
To still allow testing on platforms not listed in the doc, and when such
platforms are covered by the provided filter, we should still be able to
build/run the tests on those platforms (not directly listed in
integration_platforms).
We detect a sample by its test identifier, i.e., it starts with 'sample.'.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Instead of hardcoding a set of paths and trying to find the JLink
executable in them, use the corresponding Windows registry to locate it:
`HKEY_CURRENT_USER\\Software\\SEGGER\\J-Link`
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The logic to detect the default JLink location was placed at the top of
the script, executing whenever the script was imported. The west
extension command framework loads all runners when initializing, and so
this logic was being executed even when using another runner.
Move the logic to a function that is only executed when the JLink runner
is selected, to avoid executing it at all times.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The ADI fork of OpenOCD prints a modified version line; adjusting the
regex to account for that different format when checking the OpenOCD
version.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
The following board revision properties can now be used as part
of the format string in the 'west boards -f ...' command.
- board.revisions with format {revisions}
- board.revision_default with format {revision_default}
Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
Use the --format flag in git rather than parsing the output of
the git log. The inspiration for this change was that the previous
implementation breaks if there's a ~/.gitconfig that changes the
git log format.
Signed-off-by: John Barbero Unenge <git@lsrkttn.com>
If BB tests failed, crashed, etc., log handles
could linger and crash test cleanup.
Adding log closing to a `finally` section
should prevent those issues.
Loggers should not be set up as globals,
as it makes testing much harder.
Running multiple Twisters may cause for the
logfiles to be still "in use".
When exiting main, close all logfiles
and remove their handlers from all loggers.
Do that for conftest as well.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Add a `--dry-run` (or `-d`) option to the posix kconfig
migration script for deprecated POSIX Kconfigs.
Additionally, add a set of skipped options (e.g. `TIMER`).
The `CONFIG_TIMER` option does not exist in the tree anymore
and was way too generically named previously, so the false
positive rate is astronomical, so it makes sense to skip it.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Rename the driver from uart_native_posix to uart_native_pty.
Including renaming the DTS compatible, and kconfig options, deprecating
the old ones.
And refactor the driver, generalizing it, so we can have any number of
instances.
Note that, unfortunately generalizing to N instances cannot be done
without a degree of backwards compatibility breakage: This driver was
born with all its configuration and selection of the instances based on
kconfig.
When the driver was made to use DT, it was done in a way that required
both DT and kconfig needing to manually coherently enable the 2nd UART.
This has now been fixed, which it means only DT is used to decide how
many instances are avaliable, and UART_NATIVE_POSIX_PORT_1_ENABLE is
just ignored.
Including:
* Deprecate UART_NATIVE_WAIT_PTS_READY_ENABLE: the options is always on
now as it has no practical drawbacks.
* Deprecate UART_NATIVE_POSIX_PORT_1_ENABLE: DTS intanciation defines it
being available now.
* Rename a few functions and in general shorten pseudo-tty/pseudo-
terminal to PTY instead of PTTY.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
MD5 and SHA1 are not supposed to be used nowadays on security context.
Some ancillary scripts in tree do use them, but for verification only -
or where externally mandated, such the SPDX tool.
This patch marks those usages as `usedforsecurity=False`, which helps
clarify intent.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Calling `west build --build-opt="-v" --build-opt="-j=<n>"`
passes the build options to `cmake --build ... -- <build-opt>` which
again is passed to the native build tool, such as ninja or make.
However, when ExternalProjects are used in CMake, such as in TF-M or
sysbuild builds then those extra build options are only passed to the
first image build and not those build as external projects.
CMake supports environment variables for those flags, so translate
verbosity and number of jobs to those environment variables and thereby
support those flags for all images when specified by the user.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Align with native_simulator's upstream main
3ccb09ec00e291f699219c0e3f5b14b6b1c7ceb6
Which includes:
3ccb09e nsi_errno: Add new API to get the current host side errno
32eab87 Makefile: Ser a macro to distinguish build in runner context
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Rename the driver files, binding and kconfig options, while deprecating
the old binding and kconfig options.
Uses in tree are replaced.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In order to enable the use case where the underlying flash tool supports
bulk-flashing using multiple device IDs, augment the core runner class
with this new runner capability and implement it in the nrfutil runner,
since the nrfutil tool supports it natively.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This is an extension for indexing the source code in the workspace
with GNU Global. See the command line help for more information about
Global.
Signed-off-by: Martí Bolívar <marti.bolivar@oss.qualcomm.com>
Align with native_simulator's upstream main
20d3b2b76a3bf61d35becbe17928cdf22e885b9f
Which includes:
* 20d3b2b Makefile: Support building C++ files with runner
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Added recently introduced optimizations - generation in string literal form
and faster generation for hexadecimal initializer list form - to gzip path
as well.
Signed-off-by: Irfan Ahmad <irfan.ahmad@siemens.com>
Incremental refactoring.
Fix PEP8 issues to make ruff green for config_parser.py module.
Add __init__.py to twister directory to make it a proper python package,
and make modules importable.
Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
Rework of the flashing algorithm broke the STM32N6 dfu flashing.
Add the case of using usb port and download-modifier (new n6 specific
option) as a new case of using the bin file for flashing.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>