lin
2025-08-21 57113df3a0e2be01232281fad9a5f2c060567981
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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:])