aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorCorneliu Stoicescu <corneliux.stoicescu@intel.com>2014-08-26 13:05:43 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-27 12:12:06 +0100
commit54436aeed5ac5e0da0779919f8524a0603e19c6a (patch)
tree91aa7c510dcc287a6904f2fd25f31775d5f28bce /meta/lib/oeqa
parentcd342b399b2d78724032cdd7042968d3238cd548 (diff)
downloadopenembedded-core-contrib-54436aeed5ac5e0da0779919f8524a0603e19c6a.tar.gz
oeqa/oetest.py: enable sdk tests to use hasFeature and hasPackage methods.
In order to use the hasFeature and hasPackage methods, we need to make oeSDKTest extend oeTest and also set the test context (tc) attribute in the oeTest class when loading the tests. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/oetest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 5552c4322e..ed8b3b2ffa 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -23,7 +23,7 @@ def loadTests(tc, type="runtime"):
suite = unittest.TestSuite()
elif type == "sdk":
# set the context object passed from the test class
- setattr(oeSDKTest, "tc", tc)
+ setattr(oeTest, "tc", tc)
testloader = unittest.TestLoader()
testloader.sortTestMethodsUsing = None
suite = testloader.loadTestsFromNames(tc.testslist)
@@ -66,7 +66,7 @@ class oeRuntimeTest(oeTest):
self.target = oeRuntimeTest.tc.target
super(oeRuntimeTest, self).__init__(methodName)
-class oeSDKTest(unittest.TestCase):
+class oeSDKTest(oeTest):
def __init__(self, methodName='runTest'):
self.sdktestdir = oeSDKTest.tc.sdktestdir
super(oeSDKTest, self).__init__(methodName)