Skip to content
Browse files

sanitycheck: add west-runner parameter

Several boards have multiple runners setup.  We need a way to specify
which runner to use with sanitycheck.  Introduce --west-runner option.

Signed-off-by: Michael Scott <>
  • Loading branch information...
mike-scott authored and nashif committed Jun 18, 2019
1 parent 1baae96 commit 421ce46f4bcd38065b5a8b24f309ce57e40ef839
Showing with 20 additions and 0 deletions.
  1. +20 −0 scripts/sanitycheck
@@ -676,6 +676,9 @@ class DeviceHandler(Handler):

if options.west_flash is not None:
command = ["west", "flash", "--skip-rebuild", "-d", self.outdir]
if options.west_runner is not None:
# There are two ways this option is used.
# 1) bare: --west-flash
# This results in options.west_flash == []
@@ -3015,6 +3018,7 @@ Artificially long but functional example:
which will ultimately disable ccache.

"--west-flash", nargs='?', const=[],
help="""Uses west instead of ninja or make to flash when running with
@@ -3027,6 +3031,18 @@ Artificially long but functional example:
west flash -- --board-id=foobar
help="""Uses the specified west runner instead of default when running
with --west-flash.
E.g "sanitycheck --device-testing --device-serial /dev/ttyACM0
--west-flash --west-runner=pyocd"
will translate to "west flash --runner pyocd"
NOTE: west-flash must be enabled to use this option.

parser.add_argument("--gcov-tool", default=None,
help="Path to the gcov tool to use for code coverage "
@@ -3264,6 +3280,10 @@ def main():
resource.setrlimit(resource.RLIMIT_NOFILE, (4096, 4096))
options = parse_arguments()

if options.west_runner and not options.west_flash:
error("west-runner requires west-flash to be enabled")

if options.coverage:
options.enable_coverage = True
options.enable_slow = True

0 comments on commit 421ce46

Please sign in to comment.
You can’t perform that action at this time.