summaryrefslogtreecommitdiff
path: root/yocto-poky/meta/lib/oeqa/selftest/buildhistory.py
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/lib/oeqa/selftest/buildhistory.py')
-rw-r--r--yocto-poky/meta/lib/oeqa/selftest/buildhistory.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/yocto-poky/meta/lib/oeqa/selftest/buildhistory.py b/yocto-poky/meta/lib/oeqa/selftest/buildhistory.py
index d8cae4664..674da6205 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/buildhistory.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/buildhistory.py
@@ -1,12 +1,10 @@
-import unittest
import os
import re
-import shutil
import datetime
-import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
+from oeqa.utils.commands import bitbake, get_bb_var
+from oeqa.utils.decorators import testcase
class BuildhistoryBase(oeSelfTest):
@@ -40,6 +38,9 @@ class BuildhistoryBase(oeSelfTest):
if expect_error:
self.assertEqual(result.status, 1, msg="Error expected for global config '%s' and target config '%s'" % (global_config, target_config))
search_for_error = re.search(error_regex, result.output)
- self.assertTrue(search_for_error, msg="Could not find desired error in output: %s" % error_regex)
+ self.assertTrue(search_for_error, msg="Could not find desired error in output: %s (%s)" % (error_regex, result.output))
else:
self.assertEqual(result.status, 0, msg="Command 'bitbake %s' has failed unexpectedly: %s" % (target, result.output))
+
+ # No tests should be added to the base class.
+ # Please create a new class that inherit this one, or use one of those already available for adding tests.