Drop CSV generation which was the standard for sharing information since
the early days and instead use json with more content to share
information across sessions and for report generation.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Specify why something was skipped (either filtered or through a ztest
case) and do not report testcases that are only being built as passed,
mark those tests as skipped with the reason specified as "Build only".
Keeping --no-skipped-report for now, although it has no impact.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Many option cancel out very already on,. so lets do this as part of the
option processing function first before we create workspace.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Cleanup main() and move logging code into own function.
This reduces clutter in main function and simplifies workflow.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Support new keyword in the testcase.yaml to allow filtering based on
enabled modules. This is useful when you only whitelist a limited set of
modules in your project and want to only run those samples that have
their dependencies satisfied and those modules available.
The option allows adding multiple modules, all of which need to be
enabled in the manifest.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
if --enable-valgrind is selected but no valgrind executable can be
found in PATH, exit with an error
Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
Allow retries on build errors, this is now done using
--retry-build-errors. This option is useful when for example build
failures are caused by licensing issues or intermittent network issues.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not wait till the end to update counters, do the counting at
realitime and reuse data for on-screen reporting.
Add a counter summary function for debugging.
This patch changes how we count and report skipped tests and the total
now has the skipped tests included.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
With --no-skipped-report, twister will skip over all tests marked as
skipped (filtered) in the junit report.
This is useful for CI where have 1000s of filtered tests that appear in
the report and in some cases cause tools parsing the output to fail or
provide incomplete results.
Fixes#38179
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
fixtures could also be given by twister command with --fixture option
explicitly, not only hardware map file. In this case, we should
assign those fixtures to each devices too.
Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
Add possibility to create shorter build paths when --short-build-path
option is enabled. This can help during run Twister on Windows OS and
building programs by CMake which has a problem when paths with building
files are too long. The solution based on symbolic links which help to
connect "traditional" long paths with shorter one like:
"twister_links/test_0".
Fixes#41929
Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
Fix few limitation which do not allow to run Twister on Windows OS.
Especially turn off "import pty" module, due to the fact, that this
module can be used only on POSIX OS.
Fixes#40007
Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
Fixes a bug causing tests with error status get silently skipped
when --subset is used.
Fixes: #39619
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Fixes#38046
Document the changes in twister.rst
Add baud rate to debug message in twister
Add baud parameter to twister's add_device function
Set the twister baud rate from input parameters
Use 115200 as the default baud rate if not specified
Add baud to the hwmap-schema.yaml file
Add --device-serial-baud to twister arguments
Fix compliance issues
Fix mistake in parameter name from device-baud to device-serial-baud
Refactoring of the code in orded to simplify the logic
and clear multiple definitions of the default baud rate.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Signed-off-by: Dennis Ruffer <daruffer@gmail.com>
Do calculation based on what is actually going to be run and evaluated
at runtime, ignore the cases we already know going to be skipped.
This fixes an issue where some sets would get majority of skips and
basically run nothing beside filtering.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The info of rom/ram usage by an application was lost along the
way of data processing in twister. The commit add a line which
pass further these metrices as well.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Adds feature allowing to use yaml file with dictionaries defining
tests to be quarantined (extra arg "--quarantine-list FILENAME").
The dictionaries are validated according to the proper schema
and loaded.
A flat list is created containing quarantined configurations
(configuration = platform + scenario). Configurations under quarantine
are skipped and get "Quarantine" as a reason in the results reports.
A "comment" can be added to a quarantine entry in the quarantine yaml
with more details (e.g. issue #) and it will be also added to
the report.
The status of tests under quarantine can be verify if
`--quarantine-verify` is used in addition to
"--quarantine-list FILENAME". Using these args will make twister skip
all tests which are not on the quarantine list.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Fix twister output. "Test suite" used previously did not correspond
to what was counted (test scenarios). A test scenario is an entry from
testcase/sample.yaml under "tests:", which specify configuration used to
build a test. Changes in docs will follow later on. Also replace the
amount of preselectd platforms with the amount of platforms that
were not filtered out and actually tested.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Change the sorting of test instances if --device-testing is used
within subsets. Test instances are sored depending on the context.
For CI runs the execution order is: "platform1-testA, platform1-testB,
..., platform1-testZ, platform2-testA, ...". For hardware tests, were
multiple platforms can run the tests in parallel, it is more efficient
to run in the order: "platform1-testA, platform2-testA, ...,
platform1-testB, platform2-testB, ..."
This can significantly reduce the tests execution time
for setups with multiple different platforms connected.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Now we create plaform reports for each enabled platform, this is time
consuming, especially if you are not using those reports for anything.
Make this an option and enable only if the generated reports are going
to be used.
Individual reports can also be generated from the JSON file if needed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>