diff options
author | Aaron Massey <aaronmassey@google.com> | 2022-08-15 15:43:53 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-08-17 00:01:02 +0000 |
commit | 9e1ae3735846a3e8177c5e7556d282a63f97c60c (patch) | |
tree | 50180dec0c8029463b49fbe86009510133e1f763 | |
parent | a50aa9c82256c784ef4b85e53a24c82f4973f3c9 (diff) | |
download | chrome-ec-9e1ae3735846a3e8177c5e7556d282a63f97c60c.tar.gz |
docs: Correct test/drivers README to twister
Replace zmake usages in the test drivers README with twister usages. For
code coverage, reference the newly added code_coverage.md doc in
ec/docs.
BRANCH=none
BUG=None
TEST=gitiles view
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Change-Id: Iae55818019ee84fc6b9274c42bb27fabe23dc385
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3832834
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r-- | zephyr/test/drivers/README.md | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/zephyr/test/drivers/README.md b/zephyr/test/drivers/README.md index 11c913baa8..7dfc5c51e5 100644 --- a/zephyr/test/drivers/README.md +++ b/zephyr/test/drivers/README.md @@ -1,31 +1,22 @@ -This is the combined driver test. The goal is to have many driver test suites -in one binary, so that compile time will be faster than many small tests, and +This is the drivers test directory. The goal is to have many driver test suites +in few binaries, so that compile time will be faster than many small tests, and so we can test interactions between different subsystems easily. ## Run all the test suites ```bash -(chroot) zmake test test-drivers +(chroot) ec $ ./twister -T zephyr/test/drivers ``` -To see all the output of zmake (for example if the build fails) +To see all the output of twister in stdout (for example if the build fails) ```bash -(chroot) zmake -l DEBUG -j 1 test test-drivers +(chroot) ec $ ./twister -v -i -T zephyr/test/drivers ``` ## Code coverage -To calculate code coverage for this test only - -```bash -(chroot) zmake test --coverage test-drivers -(chroot) genhtml --branch-coverage -q \ - -o build/zephyr/test-drivers/output/coverage_rpt \ - build/zephyr/test-drivers/output/zephyr.info -``` - -The report will be in build/zephyr/test-drivers/output/coverage_rpt/index.html +See the [EC code coverage] doc. ## Debugging @@ -35,15 +26,24 @@ You need the host version of gdb: (chroot) sudo emerge -j sys-devel/gdb ``` -Build the test +Build all the drivers tests ```bash -(chroot) zmake build test-drivers +(chroot) ec $ ./twister -b -T zephyr/test/drivers ``` Then run gdb +Example of running gdb on the `drivers.default` test binary: + ``` -(chroot) gdb build/zephyr/test-drivers/build-singleimage/zephyr/zephyr.exe +(chroot) ec $ gdb twister-out/native_posix/drivers.default/zephyr/zephyr.exe # Set breakpoints, run, etc. ``` +Another of running gdb now on the `drivers.chargesplash` test binary: + +``` +(chroot) ec $ gdb twister-out/native_posix/drivers.chargesplash/zephyr/zephyr.exe +``` + +[EC code coverage]: ../../../docs/code_coverage.md#zephyr-ztest-code-coverage |