diff options
author | Tristan Honscheid <honscheid@google.com> | 2022-11-15 17:17:37 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-11-16 18:33:57 +0000 |
commit | 0abdee36c61f8dc3e9164377ef77bd17394b744e (patch) | |
tree | 7797ffcb53684ce0a2f08526b05dcfb90438aff7 /docs/zephyr | |
parent | 9c52ce0b7c401ecd07d25901f16acf95369bcc5e (diff) | |
download | chrome-ec-0abdee36c61f8dc3e9164377ef77bd17394b744e.tar.gz |
docs: twister: Update docs for new twister -s flag behavior
An upstream change modified the way the `-s` flag works in Twister. This
CL updates places in our docs that reference this flag.
BRANCH=None
BUG=None
TEST=None
Signed-off-by: Tristan Honscheid <honscheid@google.com>
Change-Id: Ib610c6c8779dea3842cbf33c82f95e18c1fed99d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4028959
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Yuval Peress <peress@google.com>
Diffstat (limited to 'docs/zephyr')
-rw-r--r-- | docs/zephyr/ztest.md | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/docs/zephyr/ztest.md b/docs/zephyr/ztest.md index 84faa9371f..d6b598b0e3 100644 --- a/docs/zephyr/ztest.md +++ b/docs/zephyr/ztest.md @@ -120,24 +120,39 @@ For most use cases these are the things to remember: ## Running twister -Run all tests under a specific directory: +### Run all tests under a specific directory ```shell platform/ec$ ./twister -T path/to/my/tests ``` -Run a specific test: +### Run a specific test ```shell -platform/ec$ ./twister -s path/to/my/tests/my.test.case +platform/ec$ ./twister -s external/platform/ec/zephyr/test/<test dir>/<my.test.case> ``` -Run all tests with coverage (get more info on code coverage at -[Zephyr ztest code coverage](../code_coverage.md#Zephyr_ztest_code_coverage): +For example: +```shell +platform/ec$ ./twister -s external/platform/ec/zephyr/test/drivers/drivers.default +``` + +Explanation of this string: `external/` is not a path component, but rather a +label that indicates we are running tests from outside of the Zephyr tree; +`platform/ec/zephyr/test/` is the location of our tests relative to the first +common parent of `ZEPHYR_BASE` and `platform/ec`; `drivers` is the directory for +our driver tests, and `drivers.default` is a specific test scenario defined in +that directory's `testcase.yaml` file. + +### Run all tests with coverage + +You can find more info on code coverage at +[Zephyr ztest code coverage](../code_coverage.md#Zephyr_ztest_code_coverage). + ```shell platform/ec$ ./twister -p native_posix -p unit_testing --coverage ``` -Get more info on twister: +### Get more info on twister ```shell platform/ec$ ./twister --help ``` |