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 <auradkar@google.com>
Reviewed-by: Richard Zhang <rizhang@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
Vikram Auradkar 2022-06-25 11:16:06 -07:00 committed by Chromeos LUCI
parent 64af01caed
commit 1414622073
2 changed files with 5 additions and 2 deletions

View file

@ -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(

View file

@ -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: