aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/testimage.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-11 13:24:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-12 22:48:47 +0100
commit6a71f661732671dd5ae5d3abce0ea41c7193754d (patch)
tree11511c991f026c6444e21c2d3107996291d0f52d /meta/classes/testimage.bbclass
parent06cde90f9f4f35f0f8a1d7bf13e11e2559ad683b (diff)
downloadopenembedded-core-contrib-6a71f661732671dd5ae5d3abce0ea41c7193754d.tar.gz
testimage: Fix SDK extraction error handling
Currently if the SDK fails to extract, no error is shown and the test is marked as passed! Clearly this is incorrect, fix it to correctly raise an error. (From OE-Core rev: fb2235a21e45fa1a47c3b7a9a6a72c515ef10dd1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/testimage.bbclass')
-rw-r--r--meta/classes/testimage.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 19a37cb037..d4263df323 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -375,7 +375,10 @@ def testsdk_main(d):
sdktestdir = d.expand("${WORKDIR}/testimage-sdk/")
bb.utils.remove(sdktestdir, True)
bb.utils.mkdirhier(sdktestdir)
- subprocess.call("cd %s; %s <<EOF\n./tc\nY\nEOF" % (sdktestdir, tcname), shell=True)
+ try:
+ subprocess.check_output("cd %s; %s <<EOF\n./tc\nY\nEOF" % (sdktestdir, tcname), shell=True)
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Couldn't install the SDK:\n%s" % e.output)
try:
targets = glob.glob(d.expand(sdktestdir + "/tc/environment-setup-*"))