* [PATCH] testimage: Fix SDK extraction error handling
@ 2015-09-11 12:24 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2015-09-11 12:24 UTC (permalink / raw)
To: openembedded-core
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>
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index f0b732a..ad1f0d1 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -379,7 +379,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-*"))
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-11 12:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11 12:24 [PATCH] testimage: Fix SDK extraction error handling Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox