From 141462207335f566985836b066701704c6a56b8e Mon Sep 17 00:00:00 2001 From: Vikram Auradkar Date: Sat, 25 Jun 2022 11:16:06 -0700 Subject: [PATCH] tools: Set host as default target BUG=None TEST= ran test_runner on windows. Verfied in presubmit Change-Id: Id4cd9002ea01be5cf48b122543d3458be3a634f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3724616 Commit-Queue: Vikram Auradkar Reviewed-by: Richard Zhang Tested-by: kokoro Reviewed-by: Dennis Kempin --- tools/impl/test_runner.py | 1 + tools/impl/test_target.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/impl/test_runner.py b/tools/impl/test_runner.py index c805fad4ee..f47a2f6bcf 100644 --- a/tools/impl/test_runner.py +++ b/tools/impl/test_runner.py @@ -371,6 +371,7 @@ def main(): ) parser.add_argument( "--target", + default="host", help="Execute tests on the selected target. See ./tools/set_test_target", ) parser.add_argument( diff --git a/tools/impl/test_target.py b/tools/impl/test_target.py index b57dbb0ed1..2bb1a47799 100755 --- a/tools/impl/test_target.py +++ b/tools/impl/test_target.py @@ -114,7 +114,7 @@ class TestTarget(object): """A test target can be the local host, a VM or a remote devica via SSH.""" target_str: str - is_host: bool = False + is_host: bool = True vm: Optional[testvm.Arch] = None ssh: Optional[Ssh] = None __arch: Optional[Arch] = None @@ -131,10 +131,12 @@ class TestTarget(object): arch: testvm.Arch = parts[1] # type: ignore self.vm = arch self.ssh = Ssh("localhost", testvm.ssh_cmd_args(arch)) + self.is_host = False elif len(parts) == 2 and parts[0] == "ssh": self.ssh = Ssh(parts[1]) + self.is_host = False elif len(parts) == 1 and parts[0] == "host": - self.is_host = True + pass else: raise Exception(f"Invalid target {target_str}") if build_arch: