If modules announce they have tests, run sanitycheck on those modules.
This will run on first matrix node and as the last step after running
regular testsuite.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Generate options for sanitycheck to run tests and samples in modules.
Use the --sanitycheck-out <file> to generate a file that can be supplied
to sanitycheck on the commandline which will add additional testroots
and boards if the module does contain out of tree boards.
the module.yaml file now accepts the following:
samples:
- path/to/samples
tests:
- path/to/tests
boards:
- path/to/boards
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Now using only Path and PurePath in zephyr_modules.py to handle module
processing.
This make the code cleaner as well as remove an issue where a module
name would become an empty string when module path contained trailing
path separators.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
We need a format code for struct packing that fits in
a pointer value, "I" is fixed at 32-bit.
The conversion of string to pointer value now prints
8 bytes. This works for 32-bit since the leading
4 digits are always zero.
The replaced length check uses sizeof(void *) and not 4.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
It appears that ninja 1.6.0 or greater don't seem to send SIGTERM down
to the child processes and thus we don't terminate correctly. This
causes a hang with renode simulations.
Change terminate call to 'self.try_kill_process_by_pid()' when test
state is updated (i.e. done running with either passed or failed), in
order to explicitly send a SIGTERM to the simulator process before
sending a SIGTERM to ninja.
Refactor the terminate code so we encapsulate the behavior in one place
for a BinaryHandler.
Based on change from Stephanos Ioannidis <root@stephanos.io>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
A property may be optional with a default in a base yaml, then
overridden to be required in a subordinate file. Don't prevent this
by complaining about having a default on a required property.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.
Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.
Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
export compile commands when running with --cmake-only, this can be used
for analysis and coverage statistics.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fetch HW models from a new west module.
And, remove all pre-west glue which was used to:
* Fetch them in CI
* Validate their vesion
* Modify the include path and link to them
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This option, if set, will add arguments to CMake whenever a new build
system is being generated.
It doesn't affect other invocations of CMake, such as when cmake(1) is
run in build tool mode to actually compile the application.
See the documentation changes for details.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The ARM Generic Interrupt Controller (GIC) supports multiple interrupt
types whose linear IRQ numbers are offset by a type-specific base
number.
This commit adds a function to automatically fix up ARM GIC interrupts
in order to output a linear IRQ number that is offset by the interrupt
type-specific base number.
For more details, refer to the issue #19860.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Make sure we do enable size tracking with options that depend on the
size of generated binaries to be available.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Shortens main() a bit and makes it easier to read.
Rename write_flash() to write_flash_node(), and let write_flash() be the
top-level function. Also move the looking-up of the /chosen properties
into the the various helper functions themselves, and shorten some names
that are clear in context.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Make the node/ordinal list a part of the header comment to make the
output prettier.
Before:
/*
* Generated by gen_defines.py
*
* DTS input file:
* rv32m1_vega_ri5cy.dts.pre.tmp
*
* Directories with bindings:
* $ZEPHYR_BASE/dts/bindings
*/
/* Nodes in dependency order (ordinal : path): */
/* 0 : / */
/* 1 : /aliases */
/* 2 : /chosen */
/* 3 : /connector */
/* 4 : /cpus */
/* 5 : /cpus/cpu@0 */
/* 6 : /gpio_keys */
/* 7 : /soc */
...
After:
/*
* Generated by gen_defines.py
*
* DTS input file:
* rv32m1_vega_ri5cy.dts.pre.tmp
*
* Directories with bindings:
* $ZEPHYR_BASE/dts/bindings
*
* Nodes in dependency order (ordinal and path):
* 0 /
* 1 /aliases
* 2 /chosen
* 3 /connector
* 4 /cpus
* 5 /cpus/cpu@0
* 6 /gpio_keys
* 7 /soc
* ...
*/
Also move the writing of the top comment and the node comments into
separate functions, to shorten main() and make it easier to follow.
Piggyback some minor comment-related simplifications.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
gcovr is already a dependency in scripts/requirements.txt. The
visualization is different, but the functionality should be the same.
Tested with gcovr 4.2.
Relates to #17626.
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
We now use EDTS and gen_defines.py to generate DTS defines. We
deprecated the old script and defines several releases ago, so lets now
remove them.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Print all tests using a tree structure (depends on anytree module). This
now can be done using --test-tree option.
sanitycheck --test-tree -T tests/kernel/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Basic tool to help checking Kconfig options against a list of
hardening preferences.
This tool is available as a kconfig target, so to run it:
make/ninja hardenconfig
[Flavio Ceolin: Simplify logic and fix python lint issues]
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Erroring out for 'status = "ok"' broke backwards compatibility for a
downstream project. Accept it instead.
Maybe the error could be selectively re-enabled later.
The rest of the code only checks for 'status = "disabled"' (like the old
scripts), so no other updates are needed.
(It's a bit weird that we duplicate the property check in base.yaml.
Thinking of including base.yaml implicitly. Could clean things up then.)
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
There is no code to handle __syscall_inline so it is better removing
it from doxygen and checkpatch.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Use the folder the config file is in as an additional search directory
for openocd. This way additional files, like custom debug interface
files can be put in the support folder of a board and the openocd.cfg
can use them.
Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
We were parsing random FAIL messages from the output of test runs ad
testcases and capturing them in the xml output. Now we only parse the
name if it starts with test_.
Fixes#21162
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
gen_syscall_header.py is not longer necessary, it was just creating a
file including syscall.h. This header is now included directly by
gen_syscalls.py.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The blackmagicprobe runner's Python process fails to ignore SIGINT
when it runs GDB from the debug and flash callbacks, which is wrong.
The other runners tend to use run_server_and_client() to properly
handle this, since they start a GDB server and connect to it with a
client. The BMP USB device presents itself as a serial device which
speaks the GDB serial protocol instead, so there's no server/client,
and thus no call to run_server_and_client().
The problem is that blackmagicprobe essentially uses
subprocess.check_call() to start GDB directly, without ignoring SIGINT
in the python process. Easy fix.
Fixes: #21139
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Fixed bug in parsing testnames from source files. We added 1cpu testing
but did not update the regex and we have been passing wrong path to the
glob as well, meaning tests were not parsed at all.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When storing an updated hardware list remove the serial property value
from entries that are not connected, to reduce confusion about exactly
what ttyACM0 is connected to.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Confirm to the user what devices were found and where they are before
starting a long run that might not have found everything it was supposed
to test.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Boards like mimxrt1060_evk are recognized by the scanner through their
USB device which has an ID, but in some cases the board may be
programmed using an external J-Link probe. Support this by adding a
probe_id key that can be added to the yaml dictionary to override the
use of id for this purpose.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add manufacturer and product identifiers to produce board information
for SiLabs and NXP hardware when using --generate-hardware-map.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit fixes the issue, that --enable-coverage alone did not create
coverage information. It also required to give --coverage-platform.
Now the fallback for coverage-platform to platform works as documented
also for enable-coverage, not only for coverage option.
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
The discard report is now generated for every run as
sanity-out/sanitycheck_discard.csv, the option --discard-report was
dropped.
Fixes#20804
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The interprocessor communication can be based on shared memory.
Allow to declare this memory as with a generic name derived from
chosen declaration.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
This command needs access to DT configuration, but can no longer
access it through BuildConfiguration since
9da1d41a12.
Import edtlib and use that instead.
Fix up some other error handling and output issues while we're here to
make the script's behavior easier to inspect and debug.
Fixes: #20545
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add support for boards that utilize the TI XDS110 like the CC3220SF,
CC3235SF, CC1352R1 and CC26x2R1 LaunchXL boards. The XDS110 can expose
multiple serial endpoints one for the uart device, but another for a
trace buffer. We assume that endpoint 0 will be the UART device.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add setting runner type to jlink for 'J-Link' and openocd for
'STM32 STLink' when generating the hardware map.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This makes the misc-flasher runner usable by passing the build
directory to the underlying tool.
Fixes: #20658
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>