Unit tests currently are not runnable on Windows systems, failing
on two testfiles: test_jobserver.py and test_testsuite.py.
This commit removes code dependency on Windows-unavailable
elements on Windows systems via skipping the offending tests.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Fix issue 72083. Update path to zephyr.exe binary using
default domain from domains.yaml file.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Refactor Twister 'recording' feature moving it from Handler class
to TestInstance class and enable it also for other Harness child
classes other than Console.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Using `erase` with west-flash was blocked as it was
messing with sysbuild. With #69748 the issue is fixed, hence
'erase' is no longer blocked.
Remove obsolete twister test
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Sped up Twister via name prefix loading.
If the only thing influencing the platform selection
is the platform filter (-p), then we only load *.yaml
files that start the same way as those selected platforms.
We split the platform name to the first '/' or '@'.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.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>
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>
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>
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>
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>
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>
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>
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>
Adds tests related to the addon flags:
* --enable-ubsan
* --enable-lsan
* --enable-asan
* --enable-valgrind
* --allow-installed-plugin
* --pytest-args
* -x, --extra-args
* extra test args for the binary
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Add a test case for --device-testing without a platform specified.
Also adjust the error message to match current code.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Current test_harness after its expansion leaves straggling
mock_platform directory. This fixes that error.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
native_posix is being replaced with native_sim, let's
use native_sim instead in twister tests.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
If sysbuild is used a flag SB_CONFIG_COMPILER_WARNINGS_AS_ERRORS
has to be used in order to turn warings to errors on all images.
Align pytest tests with the change.
Fixes: #67360
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
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>
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>
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>