diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2019-09-03 16:56:41 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-09-06 08:15:45 +0100 |
commit | aaa6e45a286180150e182ba28a3092b6975d3615 (patch) | |
tree | a15edcf5269b170b60e311723568315fb8b99650 | |
parent | 273d72bbe81bc8c25d7e921d8741cf82aa57dc6e (diff) | |
download | poky-aaa6e45a286180150e182ba28a3092b6975d3615.tar.gz |
oeqa/core/tests: Fix test_data module tests
These two tests relied on the context containing the results information.
This was moved into the OETestResults class.
(From OE-Core rev: ddad00bfec3b10b5a15a2a8eb57612bb5968f51f)
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | meta/lib/oeqa/core/tests/test_data.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/lib/oeqa/core/tests/test_data.py b/meta/lib/oeqa/core/tests/test_data.py index 50811bb381..ac74098b78 100755 --- a/meta/lib/oeqa/core/tests/test_data.py +++ b/meta/lib/oeqa/core/tests/test_data.py | |||
@@ -22,8 +22,9 @@ class TestData(TestBase): | |||
22 | expectedException = "oeqa.core.exception.OEQAMissingVariable" | 22 | expectedException = "oeqa.core.exception.OEQAMissingVariable" |
23 | 23 | ||
24 | tc = self._testLoader(modules=self.modules) | 24 | tc = self._testLoader(modules=self.modules) |
25 | self.assertEqual(False, tc.runTests().wasSuccessful()) | 25 | results = tc.runTests() |
26 | for test, data in tc.errors: | 26 | self.assertFalse(results.wasSuccessful()) |
27 | for test, data in results.errors: | ||
27 | expect = False | 28 | expect = False |
28 | if expectedException in data: | 29 | if expectedException in data: |
29 | expect = True | 30 | expect = True |
@@ -35,8 +36,9 @@ class TestData(TestBase): | |||
35 | d = {'IMAGE' : 'core-image-sato', 'ARCH' : 'arm'} | 36 | d = {'IMAGE' : 'core-image-sato', 'ARCH' : 'arm'} |
36 | 37 | ||
37 | tc = self._testLoader(d=d, modules=self.modules) | 38 | tc = self._testLoader(d=d, modules=self.modules) |
38 | self.assertEqual(False, tc.runTests().wasSuccessful()) | 39 | results = tc.runTests() |
39 | for test, data in tc.failures: | 40 | self.assertFalse(results.wasSuccessful()) |
41 | for test, data in results.failures: | ||
40 | expect = False | 42 | expect = False |
41 | if expectedError in data: | 43 | if expectedError in data: |
42 | expect = True | 44 | expect = True |