This makes .config, autoconf.h, and configs.c deterministic again.
Directory listing is not deterministic, it must always be sorted.
https://reproducible-builds.org/docs/stable-inputs/
Fixes commit 61bbfb5ba25f ("scripts: introduce list_hardware.py for
listing of architectures and SoCs") in collab-hwm branch which was
squashed in mega HWMv2 commit 8dc3f85622 ("hwmv2: Introduce Hardware
model version 2 and convert devices")
SOF CI builds with both Windows and Linux and compares the outputs. This
catches practically 100% of build reproducibility issues and caught this
one too:
https://github.com/thesofproject/sof/actions/runs/8241692987/job/22539664560
HWMv2 was a "big bang" integration on both the Zephyr and SOF sides. So
this `rglob()` was a needle in a haystack but with hindsight, this issue
is really trivial to reproduce and verify:
```
apt-get install disorderfs
mkdir disorderedWorkspace/
disorderfs --shuffle-dirents=yes workspace/ disorderedWorkspace/
```
... then just build `samples/hello_world/` twice in disorderedWorkspace/
with any --board and compare the build directories.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Do not use assert_called_once_with, we can some functions more than once
and test should not prevent that.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add 'west flash' support which in the case of native_sim just start the
built application.
Reuse existing runner and rename it to be more generic as it does more
than just debugging now.
Also add debugserver command.
Fixes#36706
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Requirements added for bz2.
Blackbox test for --package-artifacts added.
package.py no longer includes twister-out no matter the outdir.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Fixes an issue with paths being output in windows-style with back
slashes, this causes issues for certain escape sequences when
cmake interprets them. Replace these paths with posix paths so
that they are not treated as possible escape sequences.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Move away from os.join.path and only rely on pathlib magic, and serialize
all paths using POSIX path separators.
This fixes documentation build and compliance check script on Windows.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
If $GIT_EXTERNAL_DIFF is set, this difftool is used instead of the default
internal unified diff, which breaks the Checkpatch check.
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
Adds tests related to the flags
that filter the tests:
* -e, --exclude-tag
* -S, --enable-slow
* --enable-slow-only
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Adds tests related to the flags
that change the console outputs:
* --detailed-test-ids
* --no-detailed-test-ids
* -i, --inline-logs
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Twister does not support running tests on QEMU on Windows.
Add a new twister handler called QEMUWinHandler which supports running
tests on Windows. Enable running tests in testinstance, only if
QEMU_BIN_PATH environment variable exists on Windows.
Modify pytest test for testinstance to reflect the change in
runnability of QEMU on Windows.
Tested by running several Ztest and console harness tests.
Signed-off-by: Michal Smola <michal.smola@nxp.com>
Extend codecov workflow to include coverage analysis.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Adds tests related to the shuffling of the tests:
* -B, --subset
* --shuffle-tests
* --shuffle-tests-seed
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
We were missing mocking for normalized_name and board detection was not
working correctly after moving to hwmv2.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The method get_kconfig_dts() relies on str's split() to split
lines into fields separated by ':'. The second field is an
absolute path to a file.
On Windows, an absolute path includes a drive's letter followed
by ':' which breaks the current code.
On Linux, although rare, a file or directory name may also include
':', which would also break the code.
The fix is to constraint the number of splits to 1.
The code then becomes:
_,b = line.split(":", 1)
Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
Skip doc/security/vulnerabilities.rst when checking for undefined Kconfig
symbols as older vulnerabilities can contain references to removed Kconfig
symbols.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remove a message that had a typo in it but, more importantly that was
not needed.
The CONFIG_ISR_TABLES_LOCAL_DECLARATION already selects EXPERIMENTAL so
a user is properly alerted about the consequences just like any other
EXPERIMENTAL features if they enable WARN_EXPERIMENTAL.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
So that we can stop using the artificial riscv32/64 dual naming. This
patch temporarily allows using both, riscv or riscv32/64.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Optionally record run-id and run-attempt github context variables
as additional test suite environment properties on upload into
ElasticSearch to track re-runs of CI workflows.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
'buffer' argument is read only, so it can be 'const'. This makes it
compatible with POSIX specification of write(3) syscall.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Align with native_simulator's upstream main
f02906708cf1668fe54ef2c2f1e159ed947573aa
Which includes:
* f029067 CPU ctrl: Fix two malformed error/warning messages
* 114f78b Host trampolines: Fix typos in comment
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add integration_platforms to the list of the default platforms per test
for improved coverage when not running in integration mode.
Some tests when run without any option do not exercise any tests and
skip the integration platforms completely.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Enhance the -s option of twister, used to point to a single scenario in
a testsuite.
- Now accept --scenario on the command line, --test still supported.
- If no testsuite is provided, extract testsuite from scenario
identifier and avoid parsing the whole tree if we only want to address
one scenario in a testsuite.
- If just the identifier of the scenario is provided to
--test/--scenario option, try to find this as well, do not need the
full path for that.
Something like this is now possible:
twister --scenario kernel.threads.init --list-tests
twister -T <path> --scenario kernel.threads.init --list-tests
twister -T <path>/kernel.threads.init --list-tests
All should print the same output.
Fixes#67307
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
According to the Zephyr documentation, the multi-level interrupts
are encoded as follows:
`L1_ID | ((L2_ID + 1) << L2_BITS) | ((L3_ID + 1) << (L3_BITS + L2_BITS))`
This means that when L3 interrupts are enabled, the gen_isr_table.py
script will receive the value of L2_ID + 1. Currently, the script
takes this value and directly compares it with the offsets set via
`CONFIG_3RD_LVL_INTR_xx_OFFSET`. This is wrong because the values from
said configurations are the same as L2_ID and because of that the
script will generate an error. To fix this, use the value of L2_ID
instead of L2_ID + 1.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Binaries are located in multiple build directory subfolders when built for
multiple domains (sysbuild is one example). Parse domains.yaml and preserve
files across all domains for testing when --prep-artifacts-for-testing
option is used.
Signed-off-by: Mike Szczys <szczys@hotmail.com>
Resolves incorrectly located `image_ok` tag in generated hex files when
CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE is used.
Fixes#64098
Signed-off-by: Abram Early <abram.early@gmail.com>
Updated the instance with the device id to have it in the summary
report also when using pytest harness.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
This commit moves all the functionality related to the current
interrupt parser into gen_isr_tables_parser_carrays.py file.
The new parser file gen_isr_tables_parser_local.py file is
implemented with the new parser that.
Additional information added to the generated interrupt header
that contains data required by the new parser.
Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
This commit breaks the code into functional classes.
This way the functionality is visibly splitted into
functional parts and it is easier to replace the
specific parser part to implement new code generators.
There is also common functionality to handle multi level interrupts
moved to configuration class.
Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
This commit cleans up the gen_isr_tables code for better clarity
and easier modification.
Changes include:
- Separate functions to load intList section.
- Replace spurious handlers in internal data with None.
Now it is the output generator work to choose right function.
- All the work to generate vt and swt separated into its own functions.
- Remove the need for internal shared array - all the information
is here in swt array.
- The update_masks function - more functionality moved here.
- Simplify bit_mask function.
Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
On the hardware, after booting up the device, on the
console might appear additional logs after receiving first
prompt. Wait and clear the buffer to avoid unexpected
messages when verifying output.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
dt_chosen_partition_addr_int|hex allow obtaining the absolute address of
a partition, which is the result of the grandparent node address plus
the partition node address.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add basic support to flash application and/or radio core for nRF54H
series. Note that features like merged hexes present in nRF53 series is
not supported.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
On some new SoCs, the erase option is not required, so introduce a new
option that doesn't set any erase mode.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Using ztest predicate feature, testcases are skipped, however, the skip
is only reported as part of the summary and not through normal
execution. Until now such tests were reported as blocked or had a null
status in the twister json output.
This changes will look into summary results and use them to confirm
parsed results and add any missing results that either were not reported
or not captured through the serial console.
The issue can be observed with the drivers.can.api test for example on
the frdm_k64f board.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
uicr_ranges dictionary entries did not contain the `_FAMILY` suffix, now
used by self.family variable, resulting in an always false check.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
As saving tests writes to file, rather than appending to it,
we should indicate that in the --save-tests help.
--load-tests help changed so its grammar is the same as --save-tests's.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
When pytest harness test is run on harware, messages sent from target
right after application start-up are lost, because connection to COM
port is not established yet. It can cause unexpected
behavior of a test. Fix it by flashing and running application after
connecting to COM port when testing on hardware.
Signed-off-by: Michal Smola <michal.smola@nxp.com>
Import of pty module causes exception when pytest harness is used
for device testing on Windows. Fix it by importing pty module
on non-windows hosts only. Add logger message for case pty
is used by mistake on Windows.
Signed-off-by: Michal Smola <michal.smola@nxp.com>
Comparisons that have constants on both side of the operator
were getting flagged incorrectly. Adjust the check so that
pure constant comparisons are not flagged, reducing false
positives.
WARNING:CONSTANT_COMPARISON: \
Comparisons should place the constant on the right side of \
the test
+BUILD_ASSERT(CONFIG_MAX_PTHREAD_COUNT == \
CONFIG_MAX_PTHREAD_MUTEX_COUNT - 1);
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Building the HEX file is optional (CONFIG_BUILD_OUTPUT_HEX), so
`bmp_flash` will fallback to elf_file if missing. Additionally, to
maintain section names the HEX is only used if it is signed.
Signed-off-by: John Whittington <git@jbrengineering.co.uk>
The cfg.elf_file is not signed, so `west flash` with a sysbuild will
not run the application if MCUboot image signature checking is on. Using
the cfg.hex_file for `bmp_flash` resolves since as the signed hex is
used when using sysbuild. Symbols are not required for flashing so the
switching from elf to hex is not an issue.
Signed-off-by: John Whittington <git@jbrengineering.co.uk>
clear_log is used to prevent a common pytest log error,
which makes logs unusable in testing.
Such a fix is useful for all tests,
so it should be autouse by default.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This constant is supposed to be defined as a long instead of an int,
presumably to support systems where int isn't large enough.
Signed-off-by: Keith Packard <keithp@keithp.com>
If people are using the zcbor script for code generation, it needs to be
at the latest version
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
clear_log is used as a fixture by pytest. We need to be able to call
it from the code level. Example of use in the file
test_harwaremap.py line 157.
Signed-off-by: Paszkiet Kamil <kamilx.paszkiet@intel.com>
Update helper method used by pytest fixtures. Extended upload
method with 'slot' parameter. Added searching of uploaded images
that can be tested or confirmed.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Currently it is tedious to know the level of an interrupt for
a node in C. One would have to go through a very complex and
error prone macros to check if there's a parent interrupt
controller & if the controller has an interrupt number and thus
not a pseudo interrupt controller like the one found in
`rv32m1`. The level of a node is required to encode the
Zephyr's multi-level interrupt number
Since it is easier to do it in the `gen_defines` script, let's
do the heavy lifting there so that we can introduce new DT
macros to get the interrupt level very easily later.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
When using direct isrs, a vector table is needed. However, if none is
present , i.e. `CONFIG_GEN_IRQ_VECTOR_TABLE=n`, this script failed. The
given error message was not helpful (`'NoneType' has no len()`).
This change makes it clearer, where to look for the problem.
Signed-off-by: Greter Raffael <rgreter@baumer.com>
When twister is run on Windows with --short-build-path option, mklink
fails to create link, because path to build dir contains forward
slashes, which are not handled correctly by mklink.
Fix it by using os.path.normpath in mklink call.
Added os.path.join mock in twister unit test to handle path join
consistently.
Signed-off-by: Michal Smola <michal.smola@nxp.com>
Currently, the noclearout pytest mark generates warnings because
it is not registered.
This commit adds its registration in the relevant conftest.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Automatically populate the snippet roots from Zephyr modules, instead of
only looking in `ZEPHYR_BASE`.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Rather than duplicating the same schema, define it only once and reuse
for both common section and tests section.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Extend the gen_defines.py write_interrupts(node) function to
generate macros to get the interrupt controller for an
interrupt specifier by idx and by name.
The information is already generated by edtlib.py and stored in
node.interrupts[].controller. This addition uses the node pointed
to by the controller member to generate the following example output
define DT_N_S_device1_IRQ_IDX_0_CONTROLLER \
DT_N_S_gpio_800
define DT_N_S_device1_IRQ_NAME_test4_CONTROLLER \
N_S_device1_IRQ_IDX_0_CONTROLLER
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The "Submitter is same as Assignee" is comparing strings to <Area> and
always failing the condition, fix it by dropping the ".name".
Tested with ./scripts/set_assignees.py -v -y -P 67526 (now falls back to
the other maintainer as it should).
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Align with native_simulator's upstream main
880eea00abf0191f3d986559876359a5422c9618
Which includes:
* 880eea0 HW scheduler: Minor optimization
* 37c0d86 Minor: Comment fix: Remove out of date reference
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add dt_node_ph_array_prop_int/hex function to query value of cells
from a phandle-array property of a node at a given index of the array.
Based on dt_node_array_prop_int/hex.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
When using the code and data relocation feature, every relocated symbol
would be marked with `KEEP()` in the generated linker script. Therefore,
if any input files contained unused code, then it wouldn't be discarded
by the linker, even when invoked with `--gc-sections`.
This can cause unexpected bloat, or other link-time issues stemming from
some symbols being discarded and others not.
On the other hand, this behavior has been present since the feature's
introduction, so it should remain default for the users who rely on it.
This patch introduces support for `zephyr_code_relocate(... NOKEEP)`.
This will suppress the generation of `KEEP()` statements for all symbols
in a particular library or set of files.
Much like `NOCOPY`, the `NOKEEP` flag is passed to `gen_relocate_app.py`
in string form. The script is now equipped to handle multiple such flags
when passed from CMake as a semicolon-separated list, like so:
"SRAM2:NOCOPY;NOKEEP:/path/to/file1.c;/path/to/file2.c"
Documentation and tests are updated here as well.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
We are not setting the review rule value correctly and default to 'no'
for all prs, even if they were correctly reviewed by assignees.
Minor other cleanups.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If a collaborator removes themselves from the reviewer list, do not
attempt to re-add them on changes to the PR.
Fixes#67214
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Bounds check the array access in case the input data changes so that the
number of entries in the 'children' array is not the same. The tool output
with this change isn't terribly useful, but at least it doesn't crash.
Signed-off-by: Keith Packard <keithp@keithp.com>
A simple workflow that runs when a PR is merged and updates the
elasticsearch index with merged PR info.
The dashboard for displaying the information can be found here:
https://kibana.zephyrproject.io/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Harness is freeform right now in the yaml file and if the harness is not
implemented in class, things fail. While we cleanup and enforce
implementations, this should serve as a quick fix dealing with such
unimplemented harnesses.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Current blacbox tests leave two folders,
OUT_DIR and TEST_DIR after they are finished.
Unit tests create two further folders,
mock_testsuite and demo_board_2.
This change deletes them appropriately.
Additionally, the created twister-out* folders in blackbox tests are
moved to a temp directory and removed after every test.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
To make possible to build bsim tests by Twister, it is necessary to
copy executables to BabbleSim bin directory.
Signed-off-by: Piotr Golyzniak <metody159@gmail.com>
Add support for J-Link over IP and J-Link remote server.
If the "--dev-id" is a valid ip, the transport over ip is selected.
Otherwise usb is selected.
Signed-off-by: Michael Arnold <marnold@baumer.com>
The current zephyr.spdx does not contain the modules included in the build.
This commit split the zephyr-sources package into multiple packages, one
for each modules found by zephyr_module.py.
Signed-off-by: Thomas Gagneret <tgagneret@witekio.com>
Generated outputs can be difficult to read, preserving comments helps a
lot and they often provide good `git grep` search keywords.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Zero-functional change.
Also move it to a separate line so it's more convenient to temporarily
comment it out.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
CMake-based build systems like Zephyr's use separate build directories;
one for each build configuration. Even Zephyr's multi-build system
"sysbuild" (which is not relevant here) uses separate subdirectories.
So there is only one pre-processed, .toml file generated by build
directory and no need to vary its filename based on the platform name or
any other configuration parameter. It can and should keep the same
filename across build directories as zephyr.elf and all other build
artefacts do.
Moreover, when building a collection of configurations (as for instance
`sof/scripts/xtensa-build-zephyr.py` does), keeping all build
directories consistent with each other simplifies installation,
checksumming and any other post-processing.
"Fixes" recent commit 15336045af ("west: sign.py: generate platf.toml
from platf.toml.h with cc -E")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Twister DeviceHandler now checks `--enable-coverage` command line argument
instead of `--coverage` when it deals with device output.
This resolves potential problem when only `--enable-coverage` argument
is given and the coverage report is not needed. In this case the test image
which is built for code coverage works slower also producing additional
console output, so the additional DeviceHandler timeout still have to be
applied and the output with coverage data correctly processed by Harness.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Added a unit test for the platform.py module.
It covers 99% of the code. The 1% is unreachable.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
lcov 2.0 added support for processing coverage data in parallel, which
provides a large speedup when processing many files, at the cost of some
additional overhead. When running the Chrome EC tests with coverage,
parallel reporting on a 36C72T machine reduces the time spent generating
coverage reports by 40 minutes (from approximately 1 hour to 20 minutes
total runtime), at the cost of about 3x greater CPU time overall
(assumed to be overhead for parallel processing, likely from spawning
much larger numbers of subprocesses).
The level of lcov parallelism is taken from the --jobs option passed to
twister, allowing lcov to choose if unspecified.
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
This moves handling of changed lcov arguments in lcov 2.0 into helper
functions, significantly simplifying Lcov._generate() to reduce the
visual noise of extra arguments that are required but unimportant to the
task at hand.
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Make sure we set the gcov tool in a consistent way and avoid issues
where path is set as Path instead of a string.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
BinaryHandler.hanlde() method was trying to call GCOV and fails
silently because of incorrect call parameters. Moreover, even
being fixed, this call is not needed here as it attempts to
find and process .gcno and .gcna files (using wrong paths)
to create .gcov coverage text reports.
Currently the CoverageTool class does all data processing
and report generation using GCOVR or LCOV tools instead of
direct calls to GCOV.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Verify we have the coverage tool we want to use, otherwise we will end
up with many warnings and errors during coverage data collection.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Additional checks for Twister command line options `--coverage-tool`
and `--coverage-formats`.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Twister now uses GCOVR by default as the more reliable code
coverage reporting tool instead of LCOV.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Add two new keys: tags, tests.
tags for aligning with what we use in tests and samples and tests to
associate areas and components with tests.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Documentation pages around Kconfig have moved around on a couple of
occasions in the past [1] [2] and current redirects were dysfonctional
(leading /) and incomplete, while an entire set of redirects was also
missing. This notably fixes the "browse latest development version of
this page" link on
https://docs.zephyrproject.org/2.7.5/guides/build/kconfig/tips.html or a
link to the "Kconfig tips" page as found in Kconfiglib's current README
(https://pypi.org/project/kconfiglib/)
[1] commit 5342bc64dd [2] commit
5c88418428Fixes#66701
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
When scanning ports the manufacture field is not always
filled. It must be checked before using.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
The HEAP_MEM_POOL_ADD_SIZE_ is used as a prefix for matching specific
Kconfig option names, i.e. it's not a real option in itself.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
In some cases genhtml incorrectly built reports from LCOV
coverage data using full path for some of the source files
and relative paths for other files.
This fix adds `--prefix` parameter to shorten paths explicitly
relative to the ZEPHYR_BASE directory.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
This gives us the flexibility to exclude certain platforms'
simulator that's known to fail from running in Twister, but
allows real hardware to be tested.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
NXP boards with CMSID-DAP are not detected by twister
--generate-hardware-map, because serial device name 'mbed' is compared
with upper case 'MBED' in a list of supported manufacturers.
Fix it by making the comparison case-insensitive.
Tested using mimxrt1020_evk.
Fixes#63765
Signed-off-by: Michal Smola <michal.smola@nxp.com>
Rename the bitmask variables from `*_LVL_INTERRUPTS` to
`INTERRUPT_LVL_BITMASK[]` array to be consistent with
`INTERRUPT_BITS`, making it easier to loop over the bitmasks.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The calculation of `THIRD_LVL_INTERRUPTS` bitmask in the
`update_masks()` function is wrong, the number of bits to shift
should be the sum of the first two levels.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Allow using the C pre-processor to generate a
`rimage/config/platform.toml` file from a "source"
`rimage/config/platform.toml.h` file.
This is optional and fully backwards compatible.
To use, do not use `-c` and point west sign at a configuration directory
instead or let it use the default `rimage/config/` directory and change
the files there.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
rimage is very verbose by default and has no -q(uiet) option, so saving
one line out of more than 100 lines is pointless.
RimageSigner.sign() was already very complex and suffering from
combinatorial explosion of parameters. With .toml
pre-processing (#65411) it's getting worse, so we really need all build
logs to show the complete rimage command.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
In the following command, the first argument `for_rimage` is passed to
`rimage` whereas `--for west` goes to west.
```
west sign for_rimage --for west
```
This is somehow valid but we really don't want anyone to do that.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Zero functional change, preparation for the .toml modularization.
RimageSigner.sign() is also way too long and too complex and this helps.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
`west sign` has been invoked by `west build` (through CMake) since
commit fad2da39aa, almost one year ago. During that time, this new
workflow has been refined and successfully used by at least two vendors,
multiple CIs across both SOF and Zephyr and many developers.
At the time, the ability to sign from `west flash` was preserved for
backwards compatibility. This means rimage parameters can come from many
different places at once and that rimage can be invoked twice during a
single `west flash` invocation!
Now that Zephyr 3.5 has been released, we need to reduce the number of
rimage use cases and the corresponding validation complexity and
maintenance workload to simplify and accelerate new features like
splitting rimage configuration files (#65411)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This removes escape from generate XML_CATALOG_EACH string, because
the string between CDATA tag need to be treated as normal text.
Signed-off-by: Fang Huang <fang.huang@intel.com>
Fixes#65477
Platform key checking seemed to be erroneous;
now the variable names, comments and code seem in line with each other.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Support lcov > 2.0 tool which has strict error checking and some new
configuration options deprecating syntax used in 1.4 versions.
Fixes#62202
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Improve documentation about pytest integration with Twister. Add
examples of usage, improve description of available options and
introduce automatic doc generation of two plugin classes (DeviceAdapter
and Shell) basing on their docstrings from source code.
Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
Introduce Kconfig option in zephyr build system that reflects the TF-M
cmake config variable with the same default value for dummy provisioning
and have it satisfy the IAK present requirement.
This configuration is not suitable for production, and by having this
in zephyr configuration we can have this as part of the hardened
configuration check.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
as in windows platfrom the format by default is not utf-8,
and we will see below error
Traceback (most recent call last):
File "...zephyr\scripts\twister", line 211, in <module>
ret = main(options)
^^^^^^^^^^^^^
File "...scripts/pylib/twister\twisterlib\twister_main.py",
tplan.load()
File "...scripts/pylib/twister\twisterlib\testplan.py",
self.load_from_file(last_run, filter_platform=connected_list)
File "...scripts/pylib/twister\twisterlib\testplan.py",
instance.create_overlay(platform, self.options.enable_asan,
self.options.enable_ubsan, self.options.enable_coverage,
self.options.coverage_platform)
File "...scripts/pylib/twister\twisterlib\testinstance.py"
f.write(content)
UnicodeEncodeError: 'gbk' codec can't encode character '\xf8'
in position 64: illegal multibyte sequence
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>