Add a static method for dumping hardware map and reuse it across the
script reducing duplicated code.
Fixes#21475
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Added support of the Microchip with FTDI serial devices to be able
create a hardware map for them. In the future that hardware map
for the Microchip board will let run automatic Sanitycheck tests on it.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
timeouts were not reported correctly and we were getting the default
'N/A' in case of a timeout.
Fixes#21438
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When testing with one device and without a hardware map, make sure we
load the temporary map into the suite.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
More changes moving away from using global options and instead using
class variables and parameters.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This function is not used anywhere else now that we use logging module,
so push this into the class where it is being used.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The use of a global options variable is making it very difficult to
create a testsuite for this script, so reduce and push options into
arguments instead.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Drop custom output functions and use logging mode for almost all
reporting. Also log everything into sanitycheck.log so detailed run
information can be inspected later, even if we did not run with
--verbose mode on the console.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Stop using global options and instead use propagated variable.
This is to make testing of sanitycheck easier.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When something goes bad during the flashing process set the reason
correctly and put the error messages from the flasher into device.log
and display the location of that file instead of an empty handler.log
right now.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move all hardware map generation/usage to a seperate class. This will
make it easier to extend the supported hardware in the future.
Signed-off-by: Anas Nashif <anas.nashif@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>
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>
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>
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>
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>
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>
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 commit relocates the QEMU-specific code that currently resides in
ProjectBuilder.run to QEMUHandler.handle, in order to align with what
other handlers are doing.
For more details, refer to the PR #20573.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>