Gitlint-core has loose requirements and not conflicting
with scancode-toolkit v32.4.1 (click==8.1.3 vs click>=8.2.0).
Signed-off-by: Nicolae Dicu <nicolae.dicu@nordicsemi.no>
Use `collections.defaultdict` to simplify code, and use the `bytes`
type internally rather than hex strings.
Signed-off-by: Jordan Yates <jordan@embeint.com>
implemented as an SCA for now but might benefit from being baked into
the build system so that it's always available.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Print the actual number instead of a single-element tuple.
For example: "2 messages dropped" instead of "(2,) messages dropped"
Signed-off-by: Tamás Kiss <tmik@demant.com>
The board mismatch error message in `scripts/west_commands/build.py` was
partially missing f-string formatting. This caused `{self.args.board}`
to be printed literally instead of being replaced with the actual board
value.
Fix the f-string.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
There is a fix that is needed for building on Linux and
running on Windows. Without this fix, the scripts throws
errors and fails because of the '\' instead of '/'. For
portability, the script should not use literal slashes.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
The build output meta data is written to the zephyr.meta
file not zephyr_meta.yml.
This name is defined by KERNEL_META_NAME in cmake/modules/kernel.cmake.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
The fact that log data captured with RTT has a header, like the
following, impedes the parser to parse the data properly
```
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SEGGER J-Link V8.24 - Real time terminal output
SEGGER J-Trace PRO V4.0, SN=XXXX
Process: JLinkExe
```
Signed-off-by: Leonardo Bispo <l.bispo@live.com>
This feature enables sharing of built applications between test
scenarios, allowing tests to access build artifacts from other
applications.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
The PackageName, PackageVersionand and PackageSupplier in the generated
SBOM will be updated based on the information passed in the
external-references in the module.yml.
This way packages are better recognized by vulnerability scanning tools
like cve-bin-tool.
Signed-off-by: Rico van Dongen <rdongen@ziggo.nl>
for test machine without display, need support open-cv-headless mode.
1. support headless mode
2. add parser for environment path
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Ensure we install a fully pinned west version, including requiring
hashes for all dependencies.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Parse manifest for changes and set assignees for any manifest entries
that have changed.
Other changes:
- Do not assign to meta area when additional areas are being changed
- Cleanup of unused code
- Comment where comments are needed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
requests < 2.32.4 is subject to GHSA-9hjg-9r4m-mvj7
pyyaml < 5.4 is subject to GHSA-8q59-q68h-6hv4
pyyaml < 5.1 is subject to GHSA-rprw-h62v-c2w7
protobuf < 5.29.5 is subject to GHSA-8qvm-5x2c-j2w7
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The help message for the option '-d'/'--instal-dir' of 'west sdk
install' incorrectly use '-b' in its help message.
Fix the typo by using '-d'.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Loads this file in a better way that means samples and modules
should not have to source the file before referencing Kconfig
module path variables
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Run GDB in batch mode when using RTT, so that pagination is never
enabled. This fixes RTT support when using terminals with a very small
row count.
Fixes#92417
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Fix SHA256 verification failures on Windows by ensuring consistent
line ending handling in patch files. Replace inline hash calculation
with existing get_file_sha256sum() function and modify it to read
files as text with normalized line endings before encoding to UTF-8
for hashing.
This ensures cross-platform compatibility and prevents patch
integrity check failures due to CRLF/LF differences between
operating systems.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Drop the success check for completed workflow so that the job does not
wait forever for workflows that have failed.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
PyGithub >= 2.7.0 is required for the
`Repository.get_collaborator_role_name` function used by the maintainer
check script.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The PyGithub `Repository.get_collaborator_permission` function invokes the
GitHub REST API `/repos/{owner}/{repo}/collaborators/{username}/permission`
and returns the value of the `permission` attribute in the response.
As per the GitHub documentation [1], the `permission` attribute "provides
the legacy base roles of admin, write, read and none, where the maintain
role is mapped to write and the triage role is mapped to read", and this
caused the users with `triage` permission level (i.e. the users in the
`contributors` team) to be incorrectly flagged by the script.
This commit updates the script to use the `get_collaborator_role_name`
function, which correctly returns the up-to-date user permission/role name,
including `maintain` and `triage`.
Note that the `get_collaborator_role_name` function is only available in
PyGithub>=2.7.0.
[1] https://docs.github.com/en/rest/collaborators/collaborators?apiVersion=2022-11-28#get-repository-permissions-for-a-user
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Use csv instead of a plain split to split extra arguments for extra west
flags, this allows correct passing of arguments that are internally
escaped in quotes, such as arugments containing commas.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Update the live logger to be able to read the logs from JLink, over the RTT
protocol.
The support for the jlink-rtt mode is done similarly to the currently
existing support for files and serials.
The implementation for opening the jlink for reading was inspired by the
available example from the pylink python implementation here:
https://github.com/square/pylink/blob/master/examples/pylink-rtt
In contrast to the other readers, the jlink-rtt does not support being
polled from 'select'.
To make it possible to work with such readers, the code was updated to
allow for busy-waits, instead of smart polling.
This change does not affect the current readers, but support the new
reader, and allows for future readers which does not support smart polling.
Signed-off-by: Omri Sarig <omsi@demant.com>
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Cleanup init.c code and move early boot code into arch/ and make it
accessible outside of the boot process/kernel.
All of this code is not related to the 'kernel' and is mostly used
within the architecture boot / setup process.
The way it was done, some soc code was including kernel_internal.h
directly, which shouldn't be done.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Take a repo and org argument to the do_not_merge.py script so it can be
used in the testing repository.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
5718af02c5 introduced a regression where a warning was printed
about unknown BOARD when rebuilding. Commit moved _find_board()
to an earlier stage and that was failing during the rebuild. Instead
of moving board finding earlier we can move parsing of the test_item
to the later stage as it is needed only just before running cmake.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Commit 4f637258ef reworked the twister main
function. Update the west wrapper to align with that change.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Make use of `tabulate` to pretty print the results of the hardening tool
instead of custom formatting.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Refactored twister_main.py module to simplify the code and system tests.
Removed the need to patch `sys.argv` in blackbox tests.
Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
When building in CI for specific SOCs, it's useful to only have `west blobs
fetch` pull a selected set of blob objects. This is especially helpful on
`hal_espressif`, which currently has 78 blob objects.
Add a `--allow-regex` arg to the `west blobs fetch` subcommand to filter
only specified blobs, for example:
```bash
# only download esp32 blobs, skip the other variants
❯ west blobs fetch hal_espressif --allow-regex 'lib/esp32/.*'
```
Also, replace all `str.format()` invocations with f-strings per review
feedback.
Signed-off-by: Noah Pendleton <noah.pendleton@gmail.com>