blob: da449bf8f60a34486c109c5f15cf9fae59848044 [file] [log] [blame]
Mike Frysingerd03e6b52019-08-03 12:49:01 -04001#!/usr/bin/python2
J. Richard Barnetted42a0912014-11-18 17:03:53 -08002# Simple utility to trigger a Verify job on a bunch of hosts.
3#
4# CAVEAT: no error checking; if any argument isn't a valid
5# host, it will be silently ignored. If there are no command
6# line arguments, silently succeed.
7
8import sys
9
10import common
11
12from autotest_lib.server import frontend
13
Richard Barnette73e74b02017-08-10 15:16:49 -070014# For simplicity, we want to do nothing if there are no hosts named
15# on the command line. That makes it easy to do stuff like this:
16# dut-status -b $BOARD -p bvt -n | xargs reverify_hosts
17#
18# By doing nothing, we get more useful behavior if all the DUTs selected
19# by `dut-status` are actually working.
20#
21# Note that we have to specifically test for an empty host list: I
22# _think_ (but I don't know) that the AFE calls operate on all the
J. Richard Barnetted42a0912014-11-18 17:03:53 -080023# hosts if there are no arguments given. I do know for certain that
24# with hostnames=[], the call takes longer than I was willing to
25# wait.
J. Richard Barnetted42a0912014-11-18 17:03:53 -080026
27if len(sys.argv) >= 2:
28 frontend.AFE().reverify_hosts(hostnames=sys.argv[1:])