diff options
author | Corneliu Stoicescu <corneliux.stoicescu@intel.com> | 2014-08-26 13:05:43 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-27 12:12:31 +0100 |
commit | e2b4dde94c05ac3d11e1f25c1bb12affd58c1643 (patch) | |
tree | 5f92f00ad01e35470b32ed283ed02083bb773f28 /meta/lib/oeqa/oetest.py | |
parent | e04172d8bd5bcaf0de9768d8ba044f627b2d02b0 (diff) | |
download | poky-e2b4dde94c05ac3d11e1f25c1bb12affd58c1643.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.
(From OE-Core rev: 54436aeed5ac5e0da0779919f8524a0603e19c6a)
Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/oetest.py')
-rw-r--r-- | meta/lib/oeqa/oetest.py | 4 |
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"): | |||
23 | suite = unittest.TestSuite() | 23 | suite = unittest.TestSuite() |
24 | elif type == "sdk": | 24 | elif type == "sdk": |
25 | # set the context object passed from the test class | 25 | # set the context object passed from the test class |
26 | setattr(oeSDKTest, "tc", tc) | 26 | setattr(oeTest, "tc", tc) |
27 | testloader = unittest.TestLoader() | 27 | testloader = unittest.TestLoader() |
28 | testloader.sortTestMethodsUsing = None | 28 | testloader.sortTestMethodsUsing = None |
29 | suite = testloader.loadTestsFromNames(tc.testslist) | 29 | suite = testloader.loadTestsFromNames(tc.testslist) |
@@ -66,7 +66,7 @@ class oeRuntimeTest(oeTest): | |||
66 | self.target = oeRuntimeTest.tc.target | 66 | self.target = oeRuntimeTest.tc.target |
67 | super(oeRuntimeTest, self).__init__(methodName) | 67 | super(oeRuntimeTest, self).__init__(methodName) |
68 | 68 | ||
69 | class oeSDKTest(unittest.TestCase): | 69 | class oeSDKTest(oeTest): |
70 | def __init__(self, methodName='runTest'): | 70 | def __init__(self, methodName='runTest'): |
71 | self.sdktestdir = oeSDKTest.tc.sdktestdir | 71 | self.sdktestdir = oeSDKTest.tc.sdktestdir |
72 | super(oeSDKTest, self).__init__(methodName) | 72 | super(oeSDKTest, self).__init__(methodName) |