From: Phil Blundell Date: Wed, 17 Oct 2012 20:34:58 +0000 (+0000) Subject: lib/oe/qa: Trap exceptions when running objdump X-Git-Tag: rev_ivi_2015_02_04~15138 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd555e25a98ee17ca4cf85fb6ff3b44c48a644a6;p=scm%2Fbb%2Ftizen-distro.git lib/oe/qa: Trap exceptions when running objdump This avoids propagating a failure if we encounter an ELF file that objdump can't parse for any reason. Some versions and/or configurations of objdump will refuse to read files for "the wrong" architecture. (From OE-Core rev: 11f5998e539f7b884ae1387252f8995b2dc7437f) Signed-off-by: Phil Blundell Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py index 9e5ab58..12dcd1f 100644 --- a/meta/lib/oe/qa.py +++ b/meta/lib/oe/qa.py @@ -102,5 +102,10 @@ class ELFFile: env = os.environ env["LC_ALL"] = "C" - self.objdump_output[cmd] = bb.process.run([ os.path.join(staging_dir, objdump), cmd, self.name ], env=env, shell=False)[0] - return self.objdump_output[cmd] + try: + bb.note("%s %s %s" % (objdump, cmd, self.name)) + self.objdump_output[cmd] = bb.process.run([ os.path.join(staging_dir, objdump), cmd, self.name ], env=env, shell=False)[0] + return self.objdump_output[cmd] + except Exception, e: + bb.note("%s %s %s failed: %s" % (objdump, cmd, self.name, e)) + return ""