calsoft.py: fix error reporting

Report all of the tests that failed (and remove some overly fancy
Python magic that didn't work anyway).

Change-Id: I4ee47e845fe4727c69f84b505ea5ae19a15a9270
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-10-27 15:29:26 -07:00
parent 20dc7f7d19
commit 0d8e28a171

View File

@ -98,9 +98,13 @@ def main():
exit(1)
with open(output_file, 'w') as f:
json.dump(obj=result, fp=f, indent=2)
if any(["FAIL" == x["Result"] for x in case_result_list]):
print "Test case %s failed." % (x["Name"])
sys.exit(1)
failed = 0
for x in case_result_list:
if x["Result"] == "FAIL":
print "Test case %s failed." % (x["Name"])
failed = 1
exit(failed)
if __name__ == '__main__':
main()