diff options
Diffstat (limited to 'poky/meta/lib/oeqa/core/tests')
-rw-r--r-- | poky/meta/lib/oeqa/core/tests/cases/data.py | 5 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/core/tests/cases/depends.py | 5 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/core/tests/cases/loader/invalid/oeid.py | 15 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/core/tests/cases/loader/valid/another.py | 5 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/core/tests/cases/oeid.py | 18 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/core/tests/cases/oetag.py | 5 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/core/tests/cases/timeout.py | 5 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/core/tests/common.py | 5 | ||||
-rwxr-xr-x | poky/meta/lib/oeqa/core/tests/test_data.py | 4 | ||||
-rwxr-xr-x | poky/meta/lib/oeqa/core/tests/test_decorators.py | 29 | ||||
-rwxr-xr-x | poky/meta/lib/oeqa/core/tests/test_loader.py | 17 | ||||
-rwxr-xr-x | poky/meta/lib/oeqa/core/tests/test_runner.py | 6 |
12 files changed, 44 insertions, 75 deletions
diff --git a/poky/meta/lib/oeqa/core/tests/cases/data.py b/poky/meta/lib/oeqa/core/tests/cases/data.py index 88003a6ad..0d8de87ae 100644 --- a/poky/meta/lib/oeqa/core/tests/cases/data.py +++ b/poky/meta/lib/oeqa/core/tests/cases/data.py @@ -1,5 +1,8 @@ +# # Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) +# +# SPDX-License-Identifier: MIT +# from oeqa.core.case import OETestCase from oeqa.core.decorator.oetag import OETestTag diff --git a/poky/meta/lib/oeqa/core/tests/cases/depends.py b/poky/meta/lib/oeqa/core/tests/cases/depends.py index 17cdd90b1..46e7db900 100644 --- a/poky/meta/lib/oeqa/core/tests/cases/depends.py +++ b/poky/meta/lib/oeqa/core/tests/cases/depends.py @@ -1,5 +1,8 @@ +# # Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) +# +# SPDX-License-Identifier: MIT +# from oeqa.core.case import OETestCase from oeqa.core.decorator.depends import OETestDepends diff --git a/poky/meta/lib/oeqa/core/tests/cases/loader/invalid/oeid.py b/poky/meta/lib/oeqa/core/tests/cases/loader/invalid/oeid.py deleted file mode 100644 index 038d44593..000000000 --- a/poky/meta/lib/oeqa/core/tests/cases/loader/invalid/oeid.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) - -from oeqa.core.case import OETestCase - -class AnotherIDTest(OETestCase): - - def testAnotherIdGood(self): - self.assertTrue(True, msg='How is this possible?') - - def testAnotherIdOther(self): - self.assertTrue(True, msg='How is this possible?') - - def testAnotherIdNone(self): - self.assertTrue(True, msg='How is this possible?') diff --git a/poky/meta/lib/oeqa/core/tests/cases/loader/valid/another.py b/poky/meta/lib/oeqa/core/tests/cases/loader/valid/another.py index c9ffd1777..bedc20c8a 100644 --- a/poky/meta/lib/oeqa/core/tests/cases/loader/valid/another.py +++ b/poky/meta/lib/oeqa/core/tests/cases/loader/valid/another.py @@ -1,5 +1,8 @@ +# # Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) +# +# SPDX-License-Identifier: MIT +# from oeqa.core.case import OETestCase diff --git a/poky/meta/lib/oeqa/core/tests/cases/oeid.py b/poky/meta/lib/oeqa/core/tests/cases/oeid.py deleted file mode 100644 index c2d3d32f2..000000000 --- a/poky/meta/lib/oeqa/core/tests/cases/oeid.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) - -from oeqa.core.case import OETestCase -from oeqa.core.decorator.oeid import OETestID - -class IDTest(OETestCase): - - @OETestID(101) - def testIdGood(self): - self.assertTrue(True, msg='How is this possible?') - - @OETestID(102) - def testIdOther(self): - self.assertTrue(True, msg='How is this possible?') - - def testIdNone(self): - self.assertTrue(True, msg='How is this possible?') diff --git a/poky/meta/lib/oeqa/core/tests/cases/oetag.py b/poky/meta/lib/oeqa/core/tests/cases/oetag.py index 0cae02e75..4e1d08098 100644 --- a/poky/meta/lib/oeqa/core/tests/cases/oetag.py +++ b/poky/meta/lib/oeqa/core/tests/cases/oetag.py @@ -1,5 +1,8 @@ +# # Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) +# +# SPDX-License-Identifier: MIT +# from oeqa.core.case import OETestCase from oeqa.core.decorator.oetag import OETestTag diff --git a/poky/meta/lib/oeqa/core/tests/cases/timeout.py b/poky/meta/lib/oeqa/core/tests/cases/timeout.py index 870c3157f..5dfecc7b7 100644 --- a/poky/meta/lib/oeqa/core/tests/cases/timeout.py +++ b/poky/meta/lib/oeqa/core/tests/cases/timeout.py @@ -1,5 +1,8 @@ +# # Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) +# +# SPDX-License-Identifier: MIT +# from time import sleep diff --git a/poky/meta/lib/oeqa/core/tests/common.py b/poky/meta/lib/oeqa/core/tests/common.py index 52b18a1c3..39efd504c 100644 --- a/poky/meta/lib/oeqa/core/tests/common.py +++ b/poky/meta/lib/oeqa/core/tests/common.py @@ -1,5 +1,8 @@ +# # Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) +# +# SPDX-License-Identifier: MIT +# import sys import os diff --git a/poky/meta/lib/oeqa/core/tests/test_data.py b/poky/meta/lib/oeqa/core/tests/test_data.py index 21b6c68b8..50811bb38 100755 --- a/poky/meta/lib/oeqa/core/tests/test_data.py +++ b/poky/meta/lib/oeqa/core/tests/test_data.py @@ -1,7 +1,9 @@ #!/usr/bin/env python3 # Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) +# +# SPDX-License-Identifier: MIT +# import unittest import logging diff --git a/poky/meta/lib/oeqa/core/tests/test_decorators.py b/poky/meta/lib/oeqa/core/tests/test_decorators.py index f7d11e885..499cd66ff 100755 --- a/poky/meta/lib/oeqa/core/tests/test_decorators.py +++ b/poky/meta/lib/oeqa/core/tests/test_decorators.py @@ -1,7 +1,9 @@ #!/usr/bin/env python3 - +# # Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) +# +# SPDX-License-Identifier: MIT +# import signal import unittest @@ -42,29 +44,6 @@ class TestFilterDecorator(TestBase): for test in tests: self._runFilterTest(['oetag'], test[0], test[1], test[2]) - def test_oeid(self): - # Get all cases without filtering. - filter_all = {} - test_all = {'testIdGood', 'testIdOther', 'testIdNone'} - msg_all = 'Failed to get all oeid cases without filtering.' - - # Get cases with '101' oeid. - filter_good = {'oeid': 101} - test_good = {'testIdGood'} - msg_good = 'Failed to get just one tes filtering with "101" oeid.' - - # Get cases with an invalid id. - filter_invalid = {'oeid':999} - test_invalid = set() - msg_invalid = 'Failed to filter all test using an invalid oeid.' - - tests = ((filter_all, test_all, msg_all), - (filter_good, test_good, msg_good), - (filter_invalid, test_invalid, msg_invalid)) - - for test in tests: - self._runFilterTest(['oeid'], test[0], test[1], test[2]) - class TestDependsDecorator(TestBase): modules = ['depends'] diff --git a/poky/meta/lib/oeqa/core/tests/test_loader.py b/poky/meta/lib/oeqa/core/tests/test_loader.py index b79b8bad4..519ba9609 100755 --- a/poky/meta/lib/oeqa/core/tests/test_loader.py +++ b/poky/meta/lib/oeqa/core/tests/test_loader.py @@ -1,7 +1,9 @@ #!/usr/bin/env python3 - +# # Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) +# +# SPDX-License-Identifier: MIT +# import os import unittest @@ -42,7 +44,7 @@ class TestLoader(TestBase): cases_path = self.cases_path invalid_path = os.path.join(cases_path, 'loader', 'invalid') self.cases_path = [self.cases_path, invalid_path] - expect = 'Duplicated oeid module found in' + expect = 'Duplicated oetag module found in' msg = 'Expected ImportError exception for having duplicated module' try: # Must throw ImportEror because duplicated module @@ -55,17 +57,16 @@ class TestLoader(TestBase): self.cases_path = cases_path def test_filter_modules(self): - expected_modules = {'oeid', 'oetag'} + expected_modules = {'oetag'} tc = self._testLoader(modules=expected_modules) modules = getSuiteModules(tc.suites) msg = 'Expected just %s modules' % ', '.join(expected_modules) self.assertEqual(modules, expected_modules, msg=msg) def test_filter_cases(self): - modules = ['oeid', 'oetag', 'data'] + modules = ['oetag', 'data'] expected_cases = {'data.DataTest.testDataOk', - 'oetag.TagTest.testTagGood', - 'oeid.IDTest.testIdGood'} + 'oetag.TagTest.testTagGood'} tc = self._testLoader(modules=modules, tests=expected_cases) cases = set(getSuiteCasesIDs(tc.suites)) msg = 'Expected just %s cases' % ', '.join(expected_cases) @@ -74,7 +75,7 @@ class TestLoader(TestBase): def test_import_from_paths(self): cases_path = self.cases_path cases2_path = os.path.join(cases_path, 'loader', 'valid') - expected_modules = {'oeid', 'another'} + expected_modules = {'another'} self.cases_path = [self.cases_path, cases2_path] tc = self._testLoader(modules=expected_modules) modules = getSuiteModules(tc.suites) diff --git a/poky/meta/lib/oeqa/core/tests/test_runner.py b/poky/meta/lib/oeqa/core/tests/test_runner.py index a3f3861fe..205464cfa 100755 --- a/poky/meta/lib/oeqa/core/tests/test_runner.py +++ b/poky/meta/lib/oeqa/core/tests/test_runner.py @@ -1,7 +1,9 @@ #!/usr/bin/env python3 - +# # Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) +# +# SPDX-License-Identifier: MIT +# import unittest import logging |