]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/sstatettests: Improve output of assert
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Sep 2015 19:24:28 +0000 (20:24 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Sep 2015 13:25:08 +0000 (14:25 +0100)
Currently if this fails you see:

"AssertionError: 1 != 0"

which is useless. Add the output of the failed command so we can stand
some chance of debugging what went wrong.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/sstatetests.py

index 1ce8773ff7c59b2a155a6c068ba286c46391e099..6906b21237402940c1e03280355ed92d42cb319b 100644 (file)
@@ -153,7 +153,7 @@ class SStateTests(SStateBase):
                 expected_remaining_sstate += [x for x in target_sstate_after_build if x not in target_sstate_before_build if not any(pattern in x for pattern in ignore_patterns)]
             self.remove_config(global_config[idx])
             self.remove_recipeinc(target, target_config[idx])
-            self.assertEqual(result.status, 0)
+            self.assertEqual(result.status, 0, msg = "build of %s failed with %s" % (target, result.output))
 
         runCmd("sstate-cache-management.sh -y --cache-dir=%s --remove-duplicated --extra-archs=%s" % (self.sstate_path, ','.join(map(str, sstate_archs_list))))
         actual_remaining_sstate = [x for x in self.search_sstate(target + '.*?\.tgz$') if not any(pattern in x for pattern in ignore_patterns)]