sanitycheck: include qemu log when failure is not a build issue

When tests run in Qemu fail, we want to see the log from Qemu, not the
successful build log.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2017-05-01 16:33:43 -04:00 committed by Anas Nashif
parent 1084bd5ed3
commit accc8eb6f5
1 changed files with 3 additions and 0 deletions

View File

@ -1605,6 +1605,9 @@ class TestSuite:
failure = ET.SubElement(eleTestcase, 'failure', type="failure", message=goal.reason)
p = ("%s/%s/%s" %(args.outdir, i.platform.name, i.test.name))
bl = os.path.join(p, "build.log")
if goal.reason != 'build_error':
bl = os.path.join(p, "qemu.log")
if os.path.exists(bl):
with open(bl, "r") as f:
log = f.read()