summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-08-11 13:45:25 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-16 19:25:51 +0000
commit390d08429db06038fd4fd77beaf960a4d450c8d9 (patch)
tree248c270404f9b5dcaec8c95cfe7674e011472f57
parenta0e820d517ad4672e526c191d6e16c86d06b8887 (diff)
downloadchrome-ec-390d08429db06038fd4fd77beaf960a4d450c8d9.tar.gz
zephyr: Run the upstream shell tests also
When running twister, run both the EC tests and the zephyr shell tests by default. This should provide for more consistent coverage of the shell code. BRANCH=None BUG=b:242108457 TEST=./twister Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I25078ee0a375de18afaab6a3bfc1ffc8b47b6b3a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3829060 Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Tristan Honscheid <honscheid@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--.gitlab-ci.yml2
-rwxr-xr-xutil/twister_launcher.py1
-rwxr-xr-xzephyr/firmware_builder.py6
3 files changed, 6 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 27848a69fa..2084f44f93 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -301,7 +301,7 @@ testall:
needs: ["seed_cache"]
script:
- ${EC_DIR}/twister --outdir "${EC_DIR}/twister-out/"
- -v -i
+ -v -i -p native_posix -p unit_testing
twister_coverage:
stage: test
diff --git a/util/twister_launcher.py b/util/twister_launcher.py
index cfa93f20c9..9725aa03a6 100755
--- a/util/twister_launcher.py
+++ b/util/twister_launcher.py
@@ -136,6 +136,7 @@ def main():
# Use EC base dir when no -T args specified. This will cause all
# Twister-compatible EC tests to run.
twister_cli.extend(["-T", str(ec_base)])
+ twister_cli.extend(["-T", str(zephyr_base / "tests/subsys/shell")])
# Append additional user-supplied args
twister_cli.extend(other_args)
diff --git a/zephyr/firmware_builder.py b/zephyr/firmware_builder.py
index 7e767a5902..82b21d39e6 100755
--- a/zephyr/firmware_builder.py
+++ b/zephyr/firmware_builder.py
@@ -35,6 +35,10 @@ def run_twister(platform_ec, code_coverage=False, extra_args=None):
platform_ec / "twister-out",
"-v",
"-i",
+ "-p",
+ "native_posix",
+ "-p",
+ "unit_testing",
]
if extra_args:
@@ -46,8 +50,6 @@ def run_twister(platform_ec, code_coverage=False, extra_args=None):
cmd.extend(
[
"--coverage",
- "-p",
- "native_posix",
]
)
print(" ".join(shlex.quote(str(x)) for x in cmd))