zephyr/scripts
Tristan Honscheid ea33f2fce4 twister: Allow passing additional args to native_posix test binary
This commit expands Twister's CLI so that arguments passed after
a double dash (`--`) get forwarded to the ztest test executable when
run. When built for native_posix, ztest provides a useful CLI that
allows filtering individual suites and tests, adjusting timing settings,
and controlling the shuffling seed. Currently there is no easy way to
use these (with the exception of `--seed`) without needing to dig out
the resulting `zephyr.exe` binary from the build dir and invoke it
manually.

 ### Examples

Run a specific ztest suite only (useful when writing tests and you don't
want to run a long testcase in its entirety)

```
$ scripts/twister \
    -p native_posix \
    -s
zephyr/tests/lib/cmsis_dsp/complexmath/libraries.cmsis_dsp.complexmath \
    -- -test=complexmath_q31::*
```

Unrecognized arguments that precede the double dash will result in an
error message:

```
$ scripts/twister \
  -p native_posix \
  --foobar 123 \
  -- -test=basic_math_q7::*

...
Unrecognized arguments found: '--foobar 123'. Use -- to delineate extra
arguments for test binary or pass -h for help.
```

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-12-20 23:35:36 -05:00
..
build scripts: gen_relocate_app: Fix a typo in parse_input_string() 2022-11-23 16:49:03 -05:00
checkpatch scripts: checkpatch: add Atmel Pwm typedef 2022-07-12 17:51:23 +02:00
ci scripts: ci: compliance: Remove Codeowners check 2022-12-20 17:34:35 +01:00
coccinelle everywhere: fix typos 2022-03-18 13:24:08 -04:00
coredump debug: coredump: add xtensa intel adsp, support toolchains 2022-06-23 15:44:45 -04:00
dts devicetree: edtlib: tests: add coverage for child includes 2022-11-17 06:57:46 -06:00
footprint footprint: Update conf files for nrf5340_cpunet rpmsg 2022-11-11 08:46:46 +00:00
generate_usb_vif usb-c: Generate USB-C connector VIF policies XML file 2022-12-02 08:46:04 -06:00
gitlint gitlint: Add "commit" to violation messages 2022-12-07 07:58:05 -05:00
kconfig hardening: Require CONFIG_TIMER_RANDOM_GENERATOR=n 2022-12-15 22:35:31 +01:00
logging/dictionary scripts: dictionary: Initialise Colorama during module load 2022-05-24 09:00:16 -07:00
net scripts: net: add enumerate_http_status.py 2022-10-12 09:02:21 -04:00
pylib twister: Allow passing additional args to native_posix test binary 2022-12-20 23:35:36 -05:00
release scripts: release: strip title names 2022-09-27 16:51:45 -05:00
schemas/twister tests: use ignore_fault field instead of tags 2022-11-25 06:38:05 -05:00
support scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
tests twister: tests: Add unit tests for names of external and module tests 2022-11-13 17:45:09 -05:00
tracing scripts: tracing: Initialise Colorama during module load 2022-05-24 09:00:16 -07:00
utils scripts: migrate_includes: add .hpp to extension list 2022-12-15 10:29:46 +01:00
west_commands west: runners: add file argument 2022-12-01 06:53:58 -08:00
.gitignore cleanup: rename sanitycheck references to twister 2021-01-14 07:50:52 -06:00
checkpatch.pl checkpatch: update --exclude docs 2022-12-01 15:48:30 +01:00
checkstack.pl
coccicheck scripts: Allow use of bash outside of /bin 2022-03-08 11:11:10 +01:00
dump_bugs_pickle.py scripts: dump_bugs_pickle: strip bug titles 2022-09-27 16:51:45 -05:00
gen_gcov_files.py scripts: gen_gcov_files.py: add argument help text 2020-06-13 16:33:22 -04:00
get_maintainer.py scripts: get_maintainer: Use SafeLaoder for yaml 2022-04-13 13:48:18 -07:00
github_helpers.py scripts: add github_helpers.py 2022-05-24 18:48:03 +02:00
list_boards.py scripts: remove ZEPHYR_BASE as default root for board listing 2022-08-18 14:29:14 +02:00
make_bugs_pickle.py scripts: add make_bugs_pickle.py 2022-05-24 18:48:03 +02:00
requirements-base.txt requirements: bump pyelftools to >=0.27 2022-06-10 09:46:31 +02:00
requirements-build-test.txt scripts: move pip pykwalify from requirements-build-test to -base 2021-01-18 16:56:24 -05:00
requirements-compliance.txt requirements: Add lxml as a requirement 2022-11-13 06:25:59 -05:00
requirements-doc.txt doc: Do not use Sphinx 5.2.0.post0 2022-09-25 10:37:32 +02:00
requirements-extras.txt clang-format: Enable InsertBraces option 2022-12-20 22:51:57 +01:00
requirements-run-test.txt soc: xtensa: tools: remove dependency of netifaces package 2022-08-16 22:51:53 -07:00
requirements.txt python3: add check_compliance package requirements 2020-08-11 14:49:48 -04:00
series-push-hook.sh scripts: series-push-hook: Use main as base comparison branch 2021-05-27 15:55:43 -05:00
set_assignees.py scripts: set_assignee: Make review requests more deterministic 2022-10-20 23:52:49 +09:00
spelling.txt scripts: updated spelling.txt file 2017-07-14 12:57:40 +03:00
tags.sh scripts: Update paths on tags.sh 2021-02-19 05:28:09 -06:00
twister scripts: twister: update twister to support QEMU platforms with sysbuild 2022-10-26 08:48:37 -04:00
valgrind.supp lvgl: Suppress memory leak errors detected by valgrind 2019-10-21 12:26:35 -07:00
west-commands.yml west: Add completion support for zsh 2022-09-06 08:43:15 -07:00
zephyr_module.py scripts: modules: Mark the build as tainted if blobs present 2022-08-29 15:57:59 +02:00