Adds checking that qualifiers listed in a soc.yml file are valid
for the socs and cpuclusters defined in that file
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This adds supports for flashing images with sysbuild where there
are multiple images per board to prevent using the same command per
image flash which might cause issues if they are not ran just once
per flash per unique board name. A deferred reset feature is also
introduced that prevents a board (or multiple) from being reset if
multiple images are to be flashed until the final one has been
flashed which prevents issues with e.g. security bits being enabled
that then prevent flashing further images.
These options can be set at a board level (in board.yml) or a SoC
level (in soc.yml), if both are present then the board configuration
will be used instead of the SoC, and regex can be used for matching
of partial names which allows for matching specific SoCs or CPU cores
regardless of the board being used
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
esp32 platforms can overflow its dram0_0_seg and dram0_1_seg.
So update current dram section to meet both cases.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Removed following fields from relevant Handlers,
as they were unused in code:
* Handler's state
* Handler's generator
* BinaryHandler's call_west_flash
* QEMUHandler's results
* QEMUWinHandler's results
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Fixes an issue with zephyr modules not being listed in sysbuild if
they did not have a Kconfig file set
Signed-off-by: Jamie McCrae <jamie.mccrae@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>
Pytest harness in Twister tries to get custom parameters to
the pytest harnesses. It is required although those do not exist
(e.g. Twister uses devices without hw map). This change checks
if the custom parameters to the pytest harnesses exists.
Fixes#71817
Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
Make the --list-tests and --tests-tree options outputs
respect the --tag and --exclude-tag options,
so that only the tests for the specified tags are listed.
Also update the TestPlan report testcases for this change.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This fixes wrong slot selection when reading partition size. According
to the comment in code, 'slot1_partition' size should be preferred:
[...] slot1_partition size is used, when available, because in
swap-move mode it can be one sector smaller. When not available,
fallback to slot0_partition (single slot dfu). [...]
This fixes a typo in the if statement which currently always results in
use of 'slot0_partition' size.
Fixes: 86c4b4caa9 ("west/sign: Move from using partition label property")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
If the src_dir_path is a child of testsuite_path,
some c files might be scanned twice.
To prevent that, we check for parentage.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Add error handling for 'gather_metrics' stage and separate
build issues from 'scripts/footprint/size_report' issues.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
In some cases, Twister would report twice the amount
of testcases run than expected, with half of them
lacking any status.
This change fixes erroneous ELF testcase name extraction,
which deleted every instance of 'test_' in the name,
rather than just the first.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Fail a test run gracefully when an unknown test level
is requested to execute with the current test plan.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
The gen_kobject_list.py script looks at DWARF debug information in the
elf file to determine the address of variables. Make sure that when
looking at DW_FORM_exprloc, it looks at both DW_OP_addr and
DW_OP_plus_uconst.
Signed-off-by: Nick Goote <ngoote@gmail.com>
Make sure filters set by property-allowlist and property-blocklist
in an including binding are recursively applied to included bindings.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Although the PropertySpec.path attribute is documented as
"the file where the property was last modified",
all property specs in Binding.prop2specs will claim
they were last modified by the top-level binding itself.
Consider:
- I1 is a base binding that specifies properties x and y
- I2 is an "intermediate" binding that includes I1,
modifying the specification for property x
- B is a top-level bindings that includes I2,
and specifies an additional property p
When enumerating the properties of B,
we expect the values of PropertySpec.path to tell us:
- y was last modified by I1
- x was last modified by I2
- p was last modified by B
However, the Binding constructor:
- first merges all included bindings into the top-level one
- eventually initializes specifications for all the defined properties
As a consequence, all defined properties claim they were last modified
by the top-level binding file.
We should instead:
- first, take into account their own specifications for the
included properties
- eventually update these specifications with the properties
the top-level binding adds or modifies
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Make sure the property specs answered by the Binding.prop2specs API
do not all claim (PropertySpec.path) they were last modified
by the top-level binding.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Use 'runner_params' specified in hardware map YAML file. This allows to
configure custom params (like openocd's adapter configuration for
FT232-based probe) when used with pytest harness.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This adds volatile type qualifier to the struct declaration matching
when looking for blank line after declarations.
Before this commit, this structure was not accepted by chheckpatch:
struct cfg {
struct gpio_driver_config common;
volatile struct grgpio_regs *regs;
int interrupt;
};
checkpatch.pl generated the following warning:
-:158: WARNING:LINE_SPACING: Missing a blank line after declarations
#158: FILE: drivers/gpio/gpio_grgpio2.c:27:
+ struct gpio_driver_config common;
+ volatile struct grgpio_regs *regs;
With this commit, the warning is no longer generated.
Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
Minor update to existing zspdx implementation to add support for
PrimaryPackagePurpose introduced in SPDX 2.3.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
os.path.abspath was mocked too broadly, leading to errors for some users,
while being undetected in the CI.
This change narrows down the mock effect, fixing the problem.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@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>
Align with native_simulator's upstream main
6f6b359c4fe26ddeed8a65ad55f5bc402d3b7f91
Which includes:
* 6f6b359 Avoid issue with llvm address sanitizer
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Some NXP boards are not detected by twister when creating hardware map,
because manufacture name is NXP instead of NXP Semiconductors expected
by twister.
Fix it by adding NXP to manufacturers list.
Signed-off-by: Michal Smola <michal.smola@nxp.com>
- Do not look CONFIG_* symbols from dynamic symbols which might
be there before the symbol table where CONFIG_* symbols are found.
- Define posix architecture in ARCHS list.
- Check if architecture is not found instead of letting the code
run into trying to access dictionary with None key.
Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
Treewide changes touching a single area or topic should have the
area/subsystem at the start of the commit message. Treewide is very
ambigous.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Improve Twister command line arguments for memory footprint:
* group and order footprint arguments meaningfully,
* clearer help descriptions,
* resolve logical inconsistences for combinations of arguments,
in particular:
`--last-metrics` now forces `--enable-size-report`,
`--show-footprint` now controls only detailed log output of
footprint deltas in comparison modes.
* align twister tests accordingly.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Refactor the skip collaborator logic to add log messages when a
collaborator is skipped because they self removed of not part of the
org.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
With commit f419ea7990 (runner: linkerserver : remove the probe ID
hardcode), support was added to use serial numbers with the linkserver
--probe argument. However, one invocation of the argument was missed,
and still used the "probe index" syntax. Resolve this issue.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
When sending commands containing something like "AT+CFUN" the expected
regex was not escaped and as a result such regex never matched what has
been echoed over serial.
Escape all commands with re.escape() so that echoed shell commands are
always matched, even when they contain special characters (like '+' in the
example above).
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Blackbox tests related to platform choice
now moved to test_platform.py:
* test_emulation_only
* test_exclude_platform
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Add test related to disable-suite-name-check flag
This flag disabling extended test suite name verification at
the beginning of Ztest test. This option could be useful for tests
or platforms, which from some reasons cannot print early logs.
Add test related disable-warnings-as-errors
Do not treat warning conditions as errors.
Signed-off-by: Artur Wilczak <arturx.wilczak@intel.com>
The currently used PyYaml version has some vulnerabilies as
described on the pull request description. It updates to
version 6.0, removing these supply chain vulnerabily.
The OSSF Scorecard was the tool used for discovering
these vulnerabilties.
Signed-off-by: Javan lacerda <javanlacerda@google.com>
ANSI color is great for viewing output in a terminal, but currently it
also gets written out to the `handler.log` file. Text editors usually
don't render these, resulting in a hard-to-read file with a lot of
gibberish interspered. This commit strips ANSI sequences from lines
before writing them to the handler log file. This change does not
affect what is printed in Twister's console output, so one would still
see the colors there.
Signed-off-by: Tristan Honscheid <honscheid@google.com>
Since there is a K_THREAD_STACK_LEN, its kernel counterpart
should also be prefixed with K_ for consistency.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
linkserver is hardcoded to probe ID, now with #70343 merged
the probe ID restriction can be removed.
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>