From: Nathan Rossi Date: Tue, 3 Sep 2019 16:56:41 +0000 (+0000) Subject: oeqa/core/tests: Fix test_data module tests X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~13395 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddad00bfec3b10b5a15a2a8eb57612bb5968f51f;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Nathan Rossi Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/core/tests/test_data.py b/meta/lib/oeqa/core/tests/test_data.py index 50811bb3811..ac74098b785 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): expectedException = "oeqa.core.exception.OEQAMissingVariable" tc = self._testLoader(modules=self.modules) - self.assertEqual(False, tc.runTests().wasSuccessful()) - for test, data in tc.errors: + results = tc.runTests() + self.assertFalse(results.wasSuccessful()) + for test, data in results.errors: expect = False if expectedException in data: expect = True @@ -35,8 +36,9 @@ class TestData(TestBase): d = {'IMAGE' : 'core-image-sato', 'ARCH' : 'arm'} tc = self._testLoader(d=d, modules=self.modules) - self.assertEqual(False, tc.runTests().wasSuccessful()) - for test, data in tc.failures: + results = tc.runTests() + self.assertFalse(results.wasSuccessful()) + for test, data in results.failures: expect = False if expectedError in data: expect = True