From: Jouni Malinen Date: Thu, 26 Mar 2015 20:18:54 +0000 (+0200) Subject: tests: Make parallel-vm.py FAIL parser more robust X-Git-Tag: hostap_2_5~919 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce591c74bff117ad428b342428e59b22fd9b140e;p=thirdparty%2Fhostap.git 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 --- diff --git a/tests/hwsim/vm/parallel-vm.py b/tests/hwsim/vm/parallel-vm.py index ae43fe0aa..5beb6522d 100755 --- a/tests/hwsim/vm/parallel-vm.py +++ b/tests/hwsim/vm/parallel-vm.py @@ -97,7 +97,12 @@ def vm_read_stdout(vm, i): elif line.startswith("FAIL"): ready = True 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)) vm['failed'].append(name) elif line.startswith("NOT-FOUND"):