]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/recipetool: add useful failure messages to test cases
authorCostin Constantin <costin.c.constantin@intel.com>
Thu, 16 Jul 2015 13:20:24 +0000 (16:20 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Jul 2015 22:24:59 +0000 (23:24 +0100)
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/recipetool.py

index 08ff4f14e031065a3cc3b42c6276886fc01cab14..12c6b255eab658c9c1681e0a143d8750bac3375d 100644 (file)
@@ -50,7 +50,7 @@ class RecipetoolTests(DevtoolBase):
         bbappendfile = self._check_bbappend(testrecipe, recipefile, templayerdir)
         # Check the bbappend contents
         with open(bbappendfile, 'r') as f:
-            self.assertEqual(expectedlines, f.readlines())
+            self.assertEqual(expectedlines, f.readlines(), "Expected lines are not present in %s" % bbappendfile)
         # Check file was copied
         filesdir = os.path.join(os.path.dirname(bbappendfile), testrecipe)
         for expectedfile in expectedfiles:
@@ -109,7 +109,7 @@ class RecipetoolTests(DevtoolBase):
         # But file should have
         copiedfile = os.path.join(os.path.dirname(bbappendfile), 'coreutils', testfile2name)
         result = runCmd('diff -q %s %s' % (testfile2, copiedfile), ignore_status=True)
-        self.assertNotEqual(result.status, 0, 'New file should have been copied but was not')
+        self.assertNotEqual(result.status, 0, 'New file should have been copied but was not %s' % result.output)
 
     @testcase(1178)
     def test_recipetool_appendfile_binary(self):