aboutsummaryrefslogtreecommitdiffstats
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:47:24 +0100
commitfb2235a21e45fa1a47c3b7a9a6a72c515ef10dd1 (patch)
treee2820a1e156a66a09a6638ce2b224f88a099c638
parentcd201664b827e37fcabca272262016b171e997d9 (diff)
downloadopenembedded-core-contrib-fb2235a21e45fa1a47c3b7a9a6a72c515ef10dd1.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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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-*"))