[oe-commits] Richard Purdie : testimage: Fix SDK extraction error handling
git at git.openembedded.org
git at git.openembedded.org
Fri Sep 11 22:42:11 UTC 2015
Module: openembedded-core.git
Branch: master-next
Commit: a6c8e68c8ec911f8aac9c97e218218da5e839046
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=a6c8e68c8ec911f8aac9c97e218218da5e839046
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date: Fri Sep 11 13:24:50 2015 +0100
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 at linuxfoundation.org>
---
meta/classes/testimage.bbclass | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 19a37cb..d4263df 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-*"))
More information about the Openembedded-commits
mailing list