autotest: fixed log dumping
This commit is contained in:
parent
feb11f0bc9
commit
3fda7bbeac
@ -37,7 +37,7 @@ def get_default_params(atype):
|
||||
def dump_logs(atype):
|
||||
'''dump DataFlash logs'''
|
||||
print("Dumping logs for %s" % atype)
|
||||
sil = util.start_SIL(atype, CLI=True)
|
||||
sil = util.start_SIL(atype)
|
||||
logfile = util.reltopdir('../buildlogs/%s.flashlog' % atype)
|
||||
log = open(logfile, mode='w')
|
||||
mavproxy = util.start_MAVProxy_SIL(atype, setup=True, logfile=log)
|
||||
@ -173,6 +173,11 @@ skipsteps = opts.skip.split(',')
|
||||
signal.signal(signal.SIGALRM, alarm_handler)
|
||||
signal.alarm(opts.timeout)
|
||||
|
||||
if opts.list:
|
||||
for step in steps:
|
||||
print(step)
|
||||
sys.exit(0)
|
||||
|
||||
def skip_step(step):
|
||||
'''see if a step should be skipped'''
|
||||
for skip in skipsteps:
|
||||
|
@ -55,7 +55,7 @@ def get_default_params(atype):
|
||||
def dump_logs(atype):
|
||||
'''dump DataFlash logs'''
|
||||
print("Dumping logs for %s" % atype)
|
||||
sil = util.start_SIL(atype, CLI=True)
|
||||
sil = util.start_SIL(atype)
|
||||
logfile = util.reltopdir('../buildlogs/%s.flashlog' % atype)
|
||||
log = open(logfile, mode='w')
|
||||
mavproxy = util.start_MAVProxy_SIL(atype, setup=True, logfile=log)
|
||||
|
@ -115,7 +115,7 @@ def pexpect_drain(p):
|
||||
except pexpect.TIMEOUT:
|
||||
pass
|
||||
|
||||
def start_SIL(atype, valgrind=False, wipe=False, CLI=False, height=None):
|
||||
def start_SIL(atype, valgrind=False, wipe=False, height=None):
|
||||
'''launch a SIL instance'''
|
||||
cmd=""
|
||||
if valgrind and os.path.exists('/usr/bin/valgrind'):
|
||||
@ -123,8 +123,6 @@ def start_SIL(atype, valgrind=False, wipe=False, CLI=False, height=None):
|
||||
cmd += reltopdir('tmp/%s.build/%s.elf' % (atype, atype))
|
||||
if wipe:
|
||||
cmd += ' -w'
|
||||
if CLI:
|
||||
cmd += ' -s'
|
||||
if height is not None:
|
||||
cmd += ' -H %u' % height
|
||||
ret = pexpect.spawn(cmd, logfile=sys.stdout, timeout=5)
|
||||
|
Loading…
Reference in New Issue
Block a user