You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
816 B
43 lines
816 B
7 months ago
|
import getopt
|
||
|
|
||
|
test = None
|
||
|
logdir = None
|
||
|
|
||
|
|
||
|
def usage():
|
||
|
print "usage: -t <test name> -m <machines> -l <log dir>"
|
||
|
|
||
|
def run(client):
|
||
|
m = hosts.create_host(client)
|
||
|
at = autotest.Autotest()
|
||
|
|
||
|
results_dir = os.path.join(logdir, client)
|
||
|
at.run_test(test, results_dir, m)
|
||
|
|
||
|
|
||
|
def main():
|
||
|
global test, logdir, args
|
||
|
|
||
|
try:
|
||
|
opts, args = getopt.getopt(args, 't:l:', [])
|
||
|
except getopt.GetoptError, e:
|
||
|
usage()
|
||
|
print e
|
||
|
sys.exit(1)
|
||
|
|
||
|
for flag, value in opts:
|
||
|
if flag == '-t':
|
||
|
test = value
|
||
|
elif flag == '-l':
|
||
|
logdir = value
|
||
|
|
||
|
if test is None or logdir is None:
|
||
|
usage()
|
||
|
sys.exit(1)
|
||
|
|
||
|
print "Going to launch %s on %r with log dir of %s." % (test, machines, logdir)
|
||
|
parallel_simple(run, machines)
|
||
|
|
||
|
|
||
|
main()
|