hwsim tests: Reset at the end of a test
Resetting at the beginning causes the reset logging/tracing data to leak from the previous test into the next, and the last one being missed at all - reset at the end of each run instead. Also reset before all tests just in case running a test actually crashed the python script. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
0d5a54048b
commit
8f946511c9
1 changed files with 5 additions and 4 deletions
|
@ -200,6 +200,10 @@ def main():
|
||||||
skipped = []
|
skipped = []
|
||||||
failed = []
|
failed = []
|
||||||
|
|
||||||
|
# make sure nothing is left over from previous runs
|
||||||
|
# (if there were any other manual runs or we crashed)
|
||||||
|
reset_devs(dev, apdev)
|
||||||
|
|
||||||
if args.dmesg:
|
if args.dmesg:
|
||||||
subprocess.call(['sudo', 'dmesg', '-c'], stdout=open('/dev/null', 'w'))
|
subprocess.call(['sudo', 'dmesg', '-c'], stdout=open('/dev/null', 'w'))
|
||||||
|
|
||||||
|
@ -211,7 +215,6 @@ def main():
|
||||||
if not t.__module__ in args.testmodules:
|
if not t.__module__ in args.testmodules:
|
||||||
continue
|
continue
|
||||||
with DataCollector(args.logdir, t.__name__, args.tracing, args.dmesg):
|
with DataCollector(args.logdir, t.__name__, args.tracing, args.dmesg):
|
||||||
reset_devs(dev, apdev)
|
|
||||||
logger.info("START " + t.__name__)
|
logger.info("START " + t.__name__)
|
||||||
if log_to_file:
|
if log_to_file:
|
||||||
print "START " + t.__name__
|
print "START " + t.__name__
|
||||||
|
@ -275,8 +278,6 @@ def main():
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
logger.info("Failed to issue TEST-STOP after " + t.__name__ + " for " + d.ifname)
|
logger.info("Failed to issue TEST-STOP after " + t.__name__ + " for " + d.ifname)
|
||||||
logger.info(e)
|
logger.info(e)
|
||||||
|
|
||||||
if not args.tests:
|
|
||||||
reset_devs(dev, apdev)
|
reset_devs(dev, apdev)
|
||||||
|
|
||||||
if conn:
|
if conn:
|
||||||
|
|
Loading…
Reference in a new issue