blob: 8d31ac1f0fbc16425dc6114a1d7f0565897aecbf [file] [log] [blame]
#!/usr/bin/python
# Simple utility to trigger a Verify job on a bunch of hosts.
#
# CAVEAT: no error checking; if any argument isn't a valid
# host, it will be silently ignored. If there are no command
# line arguments, silently succeed.
import sys
import common
from autotest_lib.server import frontend
# For simplicity, we want to do nothing if there are no hosts named
# on the command line. That makes it easy to do stuff like this:
# dut-status -b $BOARD -p bvt -n | xargs reverify_hosts
#
# By doing nothing, we get more useful behavior if all the DUTs selected
# by `dut-status` are actually working.
#
# Note that we have to specifically test for an empty host list: I
# _think_ (but I don't know) that the AFE calls operate on all the
# hosts if there are no arguments given. I do know for certain that
# with hostnames=[], the call takes longer than I was willing to
# wait.
if len(sys.argv) >= 2:
frontend.AFE().reverify_hosts(hostnames=sys.argv[1:])