tests: Make parallel-vm.py FAIL parser more robust

It looks like it was possible to receive an incomplete FAIL line and
break out from test execution due to a parsing error. Handle this more
robustly and log the error.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2015-03-26 22:18:54 +02:00 committed by Jouni Malinen
parent 25f2cb618c
commit ce591c74bf

View file

@ -97,7 +97,12 @@ def vm_read_stdout(vm, i):
elif line.startswith("FAIL"): elif line.startswith("FAIL"):
ready = True ready = True
total_failed += 1 total_failed += 1
name = line.split(' ')[1] vals = line.split(' ')
if len(vals) < 2:
logger.info("VM[%d] incomplete FAIL line: %s" % (i, line))
name = line
else:
name = vals[1]
logger.debug("VM[%d] test case failed: %s" % (i, name)) logger.debug("VM[%d] test case failed: %s" % (i, name))
vm['failed'].append(name) vm['failed'].append(name)
elif line.startswith("NOT-FOUND"): elif line.startswith("NOT-FOUND"):