blob: 42f623877066463183915fad0af53f80691e1fe0 [file] [log] [blame]
#!/usr/bin/python
import sys,os
autodir = None
try:
autodir = os.path.dirname(os.path.realpath('/etc/autotest.conf'))
except:
pass
if not autodir:
for path in ['/usr/local/autotest', '/home/autotest']:
if os.path.exists(os.path.join(path, '/bin/autotest')):
autodir = path
autotest = os.path.join(autodir, 'bin/autotest')
control = os.path.join(autodir, 'control')
state = os.path.join(autodir, 'control.state')
if len(sys.argv) == 1 or sys.argv[1] == 'start':
if os.path.exists(state):
print "Restarting partially completed autotest job"
os.system(autotest + ' --continue ' + control)
else:
print "No autotest jobs outstanding"