From accc8eb6f5be6451c2a4a34d8f6681882812c3cb Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Mon, 1 May 2017 16:33:43 -0400 Subject: [PATCH] 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 --- scripts/sanitycheck | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/sanitycheck b/scripts/sanitycheck index 0f089c8553e085..349c864689b7a8 100755 --- a/scripts/sanitycheck +++ b/scripts/sanitycheck @@ -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()