Commit graph zephyr/scripts
Author SHA1 Message Date
Pieter De Gendt
58bd7d476b scripts: west_commands: Remove deprecated west config global in run_common
Drop the deprecated ``from west.configuration import config`` import
from ``run_common.py``. Add a keyword-only ``config`` parameter to
``get_build_dir()``, when the caller does not provide one, instantiate a
``Configuration`` from the current workspace.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude:claude-opus-4.7
2026-06-05 18:11:38 +02:00
Pieter De Gendt
b7c6bd9b86 scripts: west_commands: Remove deprecated config global in build_helpers
The module-level ``from west.configuration import config`` import is
deprecated in favour of the ``west.configuration.Configuration`` class
(typically reached via ``self.config`` on a ``WestCommand``).

Drop the deprecated import from ``build_helpers.py`` and add a
keyword-only ``config`` parameter to ``find_build_dir()``. When the
caller does not provide one, fall back to instantiating a
``Configuration`` from the current workspace so out-of-tree behaviour
matches the populated-global path the deprecated import used to follow.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude:claude-opus-4.7
2026-06-05 18:11:38 +02:00
Lukasz Fundakowski
ca33f123a7 twister: add __tracebackhide__ to DeviceAdapter.readlines_until method
Hide stacktrace for method that is used in tests to wait for a message.

Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
2026-06-05 13:21:19 +02:00
Grzegorz Chwierut
7429b9bb15 twister: bsim: change exception handling to keep build log
Do not raise exception when exe file was not found,
as it is related with build failure. Allow processing
of exception handling in build stage to keep build.log
in twister report output.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2026-06-04 11:08:18 +02:00
Sylvio Alves
55ba672cb1 runners: esp32: add esptool optimizations
Add opt-in skip-flashed, diff-based flashing, and no-progress
flags, matching esptool defaults (all off). Report the SoC name
from CONFIG_SOC in the flash log. Refactor __init__ to take the
args object since the extra flags pushed it past the 13-argument
limit.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-06-03 18:28:24 -04:00
Fabio Baltieri
38906f701a scripts: dts: Add min-len/max-len test cases
Add test cases for the min-len and max-len binding properties.

Assisted-by: Gemini
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-06-03 18:27:48 -04:00
Fabio Baltieri
1ebe3a53db scripts: dts: Add min-len/max-len properties to edtlib spec.
Add optional min-len/max-len properties to edtlib spec to specify a valid
length range for array type values. Basically same as 7ddcb93d4a but
for prop length.

Assisted-by: Gemini
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-06-03 18:27:48 -04:00
Chaitanya Tata
f5628cb148 scripts: west: build: fix source_dir when using --test-item
When west build -T is used without an explicit source directory,
_resolve_test_item() updated self.args.source_dir but not
self.source_dir. The stale value (often CWD) was passed as APP_DIR
to CMake, so sysbuild could load the wrong CMakeLists.txt.

Set self.source_dir alongside self.args.source_dir. Add a regression
test that checks source_dir and APP_DIR point at the sample path,
not CWD.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
2026-06-03 18:16:11 -04:00
Chaitanya Tata
47d31faa40 scripts: west: build: extract _resolve_test_item from do_run
Move the --test-item handling block out of do_run() into its own
_resolve_test_item() method. No functional change; preparatory
refactor to make test_item path resolution independently testable.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
2026-06-03 18:16:11 -04:00
Chaitanya Tata
9915040cdb runners: rtsflash: use MISSING_REQUIREMENTS for optional pyusb
The rtsflash runner imported usb.core and usb.util at module level.
When pyusb is not installed, ImportError prevented the runner from
registering and test_runner_imports failed because rtsflash was
missing from the expected set.

Follow the jlink runner pattern: catch ImportError at import time,
set MISSING_REQUIREMENTS, and fail in do_run() with an explicit
install hint when dependencies are needed. Add rtsflash to the
runner imports test expected set.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
2026-06-03 18:16:11 -04:00
Josuah Demangeon
96b65f7853 west: runners: openocd: debug: add log file support
Use OpenOCD feature to use a log file instead of printing the logs out,
which west does not show. This permits accessing the OpenOCD logs at all
which are not shown otherwise.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-06-03 10:09:52 +02:00
Anas Nashif
8b271c70bf Revert "twister: disable qemu with robot"
This reverts commit d84894ce7a.

Qemu process cleanup is now fixed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-06-03 08:26:13 +02:00
Hsiu-Chi Tsai
5a001a341b scripts: west: runners: esp32: support watchdog-reset via --reset-type
The esp32 runner always passed esptool --after hard-reset. On targets
flashed over the chip built-in USB-Serial/JTAG peripheral (common on
ESP32-S3, C3 and C6 boards with no external USB-to-UART bridge),
hard-reset relies on an RTS line that does not exist, so esptool cannot
perform a real system reset. After a successful flash the chip reboots
back into download mode and does not start the application until it is
power cycled. There was no way to choose a different reset method.

Advertise the generic reset_types runner capability so users can select
the esptool post-flash reset with: west flash --reset-type watchdog-reset.
This is the method Espressif documents for USB-Serial/JTAG targets that
get stuck in download mode. The supported values are hard-reset (the
default, behavior unchanged) and watchdog-reset. This uses the same
RunnerCaps mechanism that the jlink and stm32cubeprogrammer runners
already use, so no esp32 specific option is needed.

The default path is unchanged. When reset is disabled with --no-reset,
an explicitly requested reset type is ignored with a warning. A runner
test covers the default and watchdog-reset values and the --no-reset
interaction, and a note is added to the Espressif programming and
debugging documentation.

Assisted-by: Claude Code:claude-opus-4
Signed-off-by: Hsiu-Chi Tsai <hctsai@linux.com>
2026-06-02 20:21:54 -04:00
Anas Nashif
d0b389da9e kernel: remove redundant kernel_structs.h includes
kernel.h implies kernel_structs.h via kernel_includes.h, making
explicit inclusion of kernel_structs.h unnecessary whenever kernel.h
is already included in the same translation unit.

Remove the redundant includes across arch, boards, drivers, kernel,
lib, samples, subsys, and tests trees.

in include/zephyr/kernel_structs.h:
 *  2. kernel.h shall imply kernel_structs.h, such that it shall not be
 *    necessary to include kernel_structs.h explicitly when kernel.h is
 *    included.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-06-02 20:24:14 +02:00
Pieter De Gendt
f4e63a5e37 scripts: pylib: zspdx: replace deprecated west.log with stdlib logging
The ``west.log`` module is deprecated. Drop it from every module under
``scripts/pylib/zspdx/`` and switch to standard Python
``logging.getLogger(__name__)`` instead. The reusable
``forward_logging_to_west()`` bridge wired up in ``spdx.py``routes
records emitted under the ``zspdx`` logger tree back to the command's
``self.dbg/inf/wrn/err/die``.

Call-site mapping:

  log.dbg  -> _logger.debug
  log.inf  -> _logger.info
  log.wrn  -> _logger.warning
  log.err  -> _logger.error

``except ... as e: log.err(..., str(e))`` pairs are simplified to
``except ...: _logger.exception(...)`` which already includes the
exception text and traceback.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude:claude-opus-4.7
2026-06-02 20:20:11 +02:00
Pieter De Gendt
683116578a scripts: west_commands: spdx: bridge module loggers to WestCommand output
In preparation for migrating the ``zspdx`` package away from the
deprecated ``west.log`` module, wire the reusable
``forward_logging_to_west()`` helper (from ``build_helpers.py``) so any
record emitted under the ``zspdx`` logger tree is routed back to this
command's ``self.dbg/inf/wrn/err/die`` and obeys ``west -v`` / ``west
-vv``.

Disable propagation on the ``zspdx`` parent logger so records do not
double-emit via any handler attached to the root logger.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude:claude-opus-4.7
2026-06-02 20:20:11 +02:00
Grzegorz Chwierut
70ae00206d twister: Build required applications automatically
Add support to build required_applications for a given test
automatically. Users no longer need to manually specify them
on the command line with -T and -s options.

If a required application is not found in testsuites, Twister
searches for it in the same directory as the tests.yaml file.
A new `path` field in required_applications and required_devices
allows specifying an explicit search directory.

Rename the 'name' field to 'application' in required_applications
to align the API with required_devices which already uses
'application'. The old 'name' field is kept for backward
compatibility but marked as deprecated with a runtime warning.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2026-06-02 09:25:50 -05:00
Camille BAUD
ee74030d50 west: runners: bflb_mcu_tool: Change default baudrate to 2M
All boards with built-in serial adapter support this,
upgrade value for convenience

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-06-01 12:11:34 +02:00
Josuah Demangeon
1d35748d5c style: remove whitespace in < ... >; syntax from doc/comments
Fix devicetree coding style regarding whitespaces through the tree.
This affects code snippets inside documentation, comments, error messages
as to encourage a style that passes CI. Follow-up of #101619

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-05-29 20:53:20 -07:00
Peter Mitsis
d1e397da2d scripts: build: Identify range of K_OBJ_DRIVER_xxx
Updates the gen_kobject_list.py build script to mark both
the first and last of the K_OBJ_DRIVER_xxx entries. This
sets the stage to allow for driver object checking.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2026-05-29 20:50:29 -07:00
Kyle Bonnici
fe01b66f8d CI: Update dts-linter to dts-linter 0.5.1
No rule changes, bug fixes only.

Release notes:
- Fixed resolving `#` stringification in function-like macros.
- Fixed Unknown syntax error with multiple elif branches
- Fixed idempotence violation when formatting multiline comments inside
  arrays.
- Fixed showing and applying formatting issue from virtual documents.
- Fixed idempotence violation when formatting long lines inside disabled
  #if guards.

Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
2026-05-29 23:37:34 +02:00
Graham Roff
7a00e05d64 scripts: west_commands: snippets: use zcmake.run_cmake
Replace the direct subprocess.run() call with run_cmake() from zcmake.py,
which is the standard cmake wrapper used by other west commands. This adds
cmake version validation and consistent error reporting.

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-29 23:37:20 +02:00
Carlo Caione
e4e3c466ef scripts: ci: flag redundant arm64 GIC entries in MmuRegionsCheck
The GIC register banks are now mapped by the arm64 arch core
(arch/arm64/core/mmu.c), so a hand-written GIC entry in an arm64
mmu_regions.c is redundant. Flag those entries, detected via the arm64
arm_mmu.h include, while leaving aarch32 -- which still maps the GIC in
the SoC -- and the GICv3 ITS -- a separate node the arch core does not
map -- untouched.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-05-29 22:11:24 +02:00
Andrii Anoshyn
a676cd343f tests: cover OpenOCD RTOS gate for debug
Parametrize the OpenOCD RTOS gate tests over debugserver and debug so
both command paths that emit the optional Zephyr RTOS awareness command
are covered.

Signed-off-by: Andrii Anoshyn <anoshyn.andrii@gmail.com>
2026-05-29 07:41:40 +02:00
Andrii Anoshyn
fc580b42c7 scripts: runners: openocd: gate -rtos Zephyr on target arch
OpenOCD's Zephyr RTOS awareness ('$_TARGETNAME configure -rtos Zephyr')
is only implemented for the cortex_m, cortex_r4, hla_target and arcv2
target architectures. supports_thread_info() only checked the OpenOCD
version, so with CONFIG_DEBUG_THREAD_INFO=y the runner appended the
command unconditionally. On other architectures (e.g. RISC-V, Xtensa)
OpenOCD then aborts with "Could not find target in Zephyr compatibility
list", which 'west debug' surfaces as a silent timeout.

Add target_supports_rtos(), which checks the build configuration for
CONFIG_CPU_CORTEX_M, CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_ISA_ARCV2,
and only append the -rtos command when the architecture supports it.
print_gdbserver_message() now reports that thread info is unavailable on
the architecture instead of implying it is enabled.

Add tests covering the arch gate and the existing version gate.

Fixes: #108804

Signed-off-by: Andrii Anoshyn <anoshyn.andrii@gmail.com>
2026-05-29 07:41:40 +02:00
Pieter De Gendt
09d1e59909 scripts: west_commands: rename build_helpers logger to avoid collision
scripts/west_commands/build_helpers.py used `logging.getLogger(__name__)`,
which resolves to the bare string 'build_helpers' since the module is
loaded as a top-level script. That name collides with
scripts/pylib/build_helpers/domains.py, which grabs the same logger at
import time and attaches its own StreamHandler -- defeating the
hasHandlers() guard in forward_logging_to_west and causing
domains.py's handler to print records on our behalf, in its format.

Use an explicit flat name 'zephyr_build_helpers', exposed as a
BUILD_HELPERS_LOGGER constant so the three forward_logging_to_west
callers in build.py, run_common.py and sign.py share a single source
of truth. The name deliberately stays out of the 'west.*' namespace,
whose NullHandler would also defeat hasHandlers().

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-29 07:36:45 +02:00
Pieter De Gendt
5ac32bd7dd scripts: west_commands: bridge module loggers to WestCommand output
Add a logging bridge in build_helpers.py: WestLogHandler forwards
Python logging records to a WestCommand's inf/wrn/err/dbg methods,
and forward_logging_to_west(command, names) attaches one to the named
module loggers. Convert build_helpers / zcmake / run_common's
remaining log.X calls to the equivalent _logger methods, and have
each west command that calls into these helpers (build, export, sdk,
sign, run_common's entry points) call forward_logging_to_west on
entry so the records obey `west -v` / `west -vv`.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-29 07:36:45 +02:00
Pieter De Gendt
ae0074d7d6 scripts: west_commands: replace log.die in module-level helpers
In run_common.py and zcmake.py helpers without a WestCommand in scope,
swap `log.die(msg)` for `sys.exit(msg)` -- same
observable behavior (message to stderr, exit) without needing a
command instance.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-29 07:36:45 +02:00
Pieter De Gendt
1cfe519c1f scripts: west_commands: run_common: replace deprecated west.log calls
Swap log.{die,err,wrn,inf,dbg} in run_common.py for the equivalent
methods on the invoking WestCommand. Translate the associated constants:
log.VERBOSE_VERY becomes Verbosity.DBG_MORE.
Pass the command instance the functions to dump.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-29 07:36:45 +02:00
Pieter De Gendt
e8e8e47ad5 scripts: west_commands: build: don't rely on self.args.verbose
The build command does not declare a `--verbose` argument of its own;
`self.args.verbose` only ever appears when west's top-level parser
injects it, which is not a stable contract. Use `self.verbosity`
(the WestCommand's own level) to decide whether to forward verbose
flags to the underlying build system.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-29 07:36:45 +02:00
Anas Nashif
82b368be00 scripts: add script to sync test sections in MAINTAINER file
Add a script that looks at areas and identify test identifier per area.

Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-27 21:29:56 -04:00
Anas Nashif
d84894ce7a twister: disable qemu with robot
Temporarily disable qemu with robot. Some qemu jobs are not being
terminated correctly slowing CI execution.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-27 21:18:08 -04:00
Jamie McCrae
c99aef0192 scripts: west_commands: sign: Remove imgtool support
Support for imgtool in west sign was deprecated in Zephyr 4.0,
remove it

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-05-27 15:18:06 +01:00
Vinayak Kariappa Chettimada
de04ae2d41 samples: Bluetooth: hci_ipc: Rename nrf5340_cpunet_iso to extra-iso
Rename nrf5340_cpunet_iso to extra-iso so that the
configurations is reusable across nRF SoCs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2026-05-27 15:17:20 +01:00
Valerio Setti
c15cba4e7a modules: mbedtls: rename mbedTLS library and documentation usage
Having an interface library named "mbedTLS" and the real library named
"mbedtls" (as provided by the Mbed TLS module) is misleading.
This commit replaces:
- mbedTLS -> mbedtls_iface for the CMake library. "mbedTLS" is still
             available as alias to "mbedtls_iface" for backward
             compatibility, but this should be removed in the future.
- mbedTLS -> Mbed TLS in comments and documentation.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-05-27 15:16:06 +01:00
Graham Roff
34f33e35cf scripts: west: Add completion for snippets
Add support for command-completion for the snippets arguments for bash,
zsh, and powershell.

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-27 15:12:30 +01:00
Graham Roff
49a9fac49b snippets: Add "west snippets" command
Add a "west snippets" command to list available snippets, similar to
"west boards" and "west shields". Default display shows the snippets
along with their description. The "--format" parameter as used by
"west shields" is supported for user-controlled formatting.
Shell completion scripts for bash, zsh, and powershell are also
updated to support completion for snippet names.

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-27 15:12:30 +01:00
Graham Roff
f2f8dd8454 snippets: Add snippet description
Add a "description" property to the snippet YAML schema to allow
developers and scripts to understand the purpose. Populate existing
snippets with descriptions pulled from the rst documentation.

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-27 15:12:30 +01:00
Anas Nashif
3eceb2e99e tests: twister: fix unit tests for robot support
Fix to support other simulators.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-27 08:32:42 +02:00
Anas Nashif
6489b436e9 twister: add qemu support using the Robot test framework
Now we are able to run tests using the Robot framework with Qemu.

Assisted-by: GitHub Copilot:claude-opus-4.6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-27 08:32:42 +02:00
Anas Nashif
4867140218 twister: add support for running robot tests with native_sim
Support native sim with the Robot framework.

Assisted-by: GitHub Copilot:claude-opus-4.6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-27 08:32:42 +02:00
Sebastian Modersohn
76c6c6020b scripts: west_commands: zspdx: handle ValueError of os.path.commonpath
os.path.commonpath will raise ValueError for paths with different
drives on Windows
Added new is_subpath method which handles ValueError and returns
False since it can't be a sub path. Replaces all 3 occurrences of
os.path.commonpath in walker.py.
Fixes #109641

Signed-off-by: Sebastian Modersohn <im24@msohn.de>
2026-05-26 15:24:36 +02:00
Parthiban Nallathambi
1df7cf5339 scripts: twister: tolerate qemu self-cleanup of qemu.pid
QEMUHandler.handle() reads the qemu pid file at the end of a run and
then unlinks it:

    if os.path.exists(self.pid_fn):
        with open(self.pid_fn) as pid_file:
            qemu_pid = int(pid_file.read())
        os.unlink(self.pid_fn)

The existence check, the open(), and the unlink() are not atomic.
When qemu exits on its own (slow benchmark hitting a harness
timeout, hostshutdown issued via the monitor, qemu killed by an
external signal, ...) it removes its own pid file. If that removal
lands between the os.path.exists() check and the read+unlink,
either open() or os.unlink() raises FileNotFoundError. The
exception escapes handle(), is caught in runner.py pipeline_mgr,
and the worker process exits, aborting the whole twister run.
Other tests that had not yet been scheduled never get to run, and
tests still in flight on other DUTs are abandoned.

Keep the existence check as the happy-path guard (so the no-pid-file
case still logs qemu_pid=None as before), and wrap the read+unlink
in a try/except FileNotFoundError to close the race window. A
missing pid file at cleanup time is not an error -- by definition
the qemu process is gone, which is exactly the post-condition the
cleanup is trying to reach.

Reproduced with a long-running benchmark in qemu where the guest
hit its harness eof and exited a few ms before twister got around
to the unlink. With this fix the failing test is marked FAILED and
the run continues; without it the pipeline aborts on the
FileNotFoundError.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2026-05-26 15:23:59 +02:00
Magdalena Pastula
b45a63f6b3 scripts: ci: remove SOC_NORDIC_BSP_PATH_OVERRIDE
Remove SOC_NORDIC_BSP_PATH_OVERRIDE from list of undefined Kconfigs,
as it's no longer used.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2026-05-26 15:18:49 +02:00
Anas Nashif
22c8bd973b ci: workflows: remove obsolete and outdated issue tracker
This workflow has been running for a while, but it is dated, obsolete
and based on a very old action that is not being maintained anymore.
Most importantly, nobody actually looks at the output of that script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-26 09:24:37 +02:00
Tomasz Leman
fc432f1f6b scripts: west: fix WEST_TOPDIR backslash path on Windows
Commit bfa00dcd1f ("cmake: pass Python information from west build to
CMake") changed WEST_TOPDIR from being obtained via
execute_process(COMMAND ${WEST} topdir) to being passed directly from
Python via -DWEST_TOPDIR=.

The west topdir CLI returns POSIX paths (C:/...) but the Python API
west_topdir() returns native Windows paths (C:\...). When this path
reaches check_c_compiler_flag via:

  zephyr_cc_option(-fmacro-prefix-map=${WEST_TOPDIR}=WEST_TOPDIR)

CMake interprets \U (from \Users) as an invalid escape sequence,
breaking all Windows builds.

Use pathlib.Path.as_posix() to normalize the path, consistent with how
WEST_PYTHON is already handled on the same line.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2026-05-26 09:24:12 +02:00
Alberto Escolar Piedras
560ff28823 valgrind: Suppress hasmap library realloc(ptr,size=0) warning
Add to the valgrind suppression file a rule to waive the warning
about the hash_map code using realloc() with size 0 as free().

Valgrind warns because this is not standard behaviour, but
a (common) extension:
https://en.cppreference.com/c/memory/realloc

But this is the behaviour the API requires from a realloc used
with this component:
https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/sys/hash_map_api.h#L76

As a freebie, add a license and copyright line to silence the CI check
warning

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-05-25 18:18:58 +02:00
Gobi M
e9094d367c tests: twister: expand QEMU_BIN_PATH check_runnable coverage
Extend test_check_build_or_run() to verify both existing and
non-existing QEMU_BIN_PATH values.

The previous test used an empty QEMU_BIN_PATH value, which only
covered the falsy branch and did not exercise os.path.exists().
Add explicit checks for valid and invalid non-empty paths to
improve coverage of the QEMU_BIN_PATH validation logic.

Signed-off-by: Gobi M <gobi@aerlync.com>
2026-05-25 18:18:06 +02:00
Gobi M
3a17a4f442 twister: make QEMU_BIN_PATH optional
QEMU_BIN_PATH is currently treated as a mandatory requirement for
QEMU-based tests on Windows.

Treat QEMU_BIN_PATH as an optional override and validate it only when
explicitly provided. This allows Twister to run QEMU tests using SDK or
other discovery mechanisms without requiring QEMU_BIN_PATH to be set.

Validation:
- QEMU_BIN_PATH unset -> qemu_x86 PASSED
- Invalid QEMU_BIN_PATH -> NOT RUN
- Valid QEMU_BIN_PATH -> qemu_x86 PASSED

Fixes #109332

Signed-off-by: Gobi M <gobi@aerlync.com>
2026-05-25 18:18:06 +02:00
Grzegorz Chwierut
019a118042 twister: Add testsuite option to skip build
Add a new testsuite YAML option `build` that allows a test
scenario to skip its own build step and instead use the build
artifacts from the first entry in `required_applications`.
Default is true; to skip building, set `build: false`.

This is useful for test scenarios that only run a harness (e.g.,
pytest, bsim) against an image built by another scenario, without
needing their own compiled binary.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2026-05-25 13:39:27 +02:00