diff options
Diffstat (limited to 'poky/meta/lib/oeqa/core/tests/cases')
11 files changed, 178 insertions, 0 deletions
diff --git a/poky/meta/lib/oeqa/core/tests/cases/data.py b/poky/meta/lib/oeqa/core/tests/cases/data.py new file mode 100644 index 000000000..88003a6ad --- /dev/null +++ b/poky/meta/lib/oeqa/core/tests/cases/data.py @@ -0,0 +1,20 @@ +# Copyright (C) 2016 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +from oeqa.core.case import OETestCase +from oeqa.core.decorator.oetag import OETestTag +from oeqa.core.decorator.data import OETestDataDepends + +class DataTest(OETestCase): + data_vars = ['IMAGE', 'ARCH'] + + @OETestDataDepends(['MACHINE',]) + @OETestTag('dataTestOk') + def testDataOk(self): + self.assertEqual(self.td.get('IMAGE'), 'core-image-minimal') + self.assertEqual(self.td.get('ARCH'), 'x86') + self.assertEqual(self.td.get('MACHINE'), 'qemuarm') + + @OETestTag('dataTestFail') + def testDataFail(self): + pass diff --git a/poky/meta/lib/oeqa/core/tests/cases/depends.py b/poky/meta/lib/oeqa/core/tests/cases/depends.py new file mode 100644 index 000000000..17cdd90b1 --- /dev/null +++ b/poky/meta/lib/oeqa/core/tests/cases/depends.py @@ -0,0 +1,38 @@ +# Copyright (C) 2016 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +from oeqa.core.case import OETestCase +from oeqa.core.decorator.depends import OETestDepends + +class DependsTest(OETestCase): + + def testDependsFirst(self): + self.assertTrue(True, msg='How is this possible?') + + @OETestDepends(['testDependsFirst']) + def testDependsSecond(self): + self.assertTrue(True, msg='How is this possible?') + + @OETestDepends(['testDependsSecond']) + def testDependsThird(self): + self.assertTrue(True, msg='How is this possible?') + + @OETestDepends(['testDependsSecond']) + def testDependsFourth(self): + self.assertTrue(True, msg='How is this possible?') + + @OETestDepends(['testDependsThird', 'testDependsFourth']) + def testDependsFifth(self): + self.assertTrue(True, msg='How is this possible?') + + @OETestDepends(['testDependsCircular3']) + def testDependsCircular1(self): + self.assertTrue(True, msg='How is this possible?') + + @OETestDepends(['testDependsCircular1']) + def testDependsCircular2(self): + self.assertTrue(True, msg='How is this possible?') + + @OETestDepends(['testDependsCircular2']) + def testDependsCircular3(self): + self.assertTrue(True, msg='How is this possible?') 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 new file mode 100644 index 000000000..038d44593 --- /dev/null +++ b/poky/meta/lib/oeqa/core/tests/cases/loader/invalid/oeid.py @@ -0,0 +1,15 @@ +# 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/threaded/threaded.py b/poky/meta/lib/oeqa/core/tests/cases/loader/threaded/threaded.py new file mode 100644 index 000000000..0fe4cb3f1 --- /dev/null +++ b/poky/meta/lib/oeqa/core/tests/cases/loader/threaded/threaded.py @@ -0,0 +1,12 @@ +# Copyright (C) 2017 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +from oeqa.core.case import OETestCase + +class ThreadedTest(OETestCase): + def test_threaded_no_depends(self): + self.assertTrue(True, msg='How is this possible?') + +class ThreadedTest2(OETestCase): + def test_threaded_same_module(self): + self.assertTrue(True, msg='How is this possible?') diff --git a/poky/meta/lib/oeqa/core/tests/cases/loader/threaded/threaded_alone.py b/poky/meta/lib/oeqa/core/tests/cases/loader/threaded/threaded_alone.py new file mode 100644 index 000000000..905f39784 --- /dev/null +++ b/poky/meta/lib/oeqa/core/tests/cases/loader/threaded/threaded_alone.py @@ -0,0 +1,8 @@ +# Copyright (C) 2017 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +from oeqa.core.case import OETestCase + +class ThreadedTestAlone(OETestCase): + def test_threaded_alone(self): + self.assertTrue(True, msg='How is this possible?') diff --git a/poky/meta/lib/oeqa/core/tests/cases/loader/threaded/threaded_depends.py b/poky/meta/lib/oeqa/core/tests/cases/loader/threaded/threaded_depends.py new file mode 100644 index 000000000..0c158d3ba --- /dev/null +++ b/poky/meta/lib/oeqa/core/tests/cases/loader/threaded/threaded_depends.py @@ -0,0 +1,10 @@ +# Copyright (C) 2017 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +from oeqa.core.case import OETestCase +from oeqa.core.decorator.depends import OETestDepends + +class ThreadedTest3(OETestCase): + @OETestDepends(['threaded.ThreadedTest.test_threaded_no_depends']) + def test_threaded_depends(self): + self.assertTrue(True, msg='How is this possible?') diff --git a/poky/meta/lib/oeqa/core/tests/cases/loader/threaded/threaded_module.py b/poky/meta/lib/oeqa/core/tests/cases/loader/threaded/threaded_module.py new file mode 100644 index 000000000..63d17e040 --- /dev/null +++ b/poky/meta/lib/oeqa/core/tests/cases/loader/threaded/threaded_module.py @@ -0,0 +1,12 @@ +# Copyright (C) 2017 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +from oeqa.core.case import OETestCase + +class ThreadedTestModule(OETestCase): + def test_threaded_module(self): + self.assertTrue(True, msg='How is this possible?') + +class ThreadedTestModule2(OETestCase): + def test_threaded_module2(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 new file mode 100644 index 000000000..c9ffd1777 --- /dev/null +++ b/poky/meta/lib/oeqa/core/tests/cases/loader/valid/another.py @@ -0,0 +1,9 @@ +# Copyright (C) 2016 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +from oeqa.core.case import OETestCase + +class AnotherTest(OETestCase): + + def testAnother(self): + self.assertTrue(True, msg='How is this possible?') diff --git a/poky/meta/lib/oeqa/core/tests/cases/oeid.py b/poky/meta/lib/oeqa/core/tests/cases/oeid.py new file mode 100644 index 000000000..c2d3d32f2 --- /dev/null +++ b/poky/meta/lib/oeqa/core/tests/cases/oeid.py @@ -0,0 +1,18 @@ +# 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 new file mode 100644 index 000000000..0cae02e75 --- /dev/null +++ b/poky/meta/lib/oeqa/core/tests/cases/oetag.py @@ -0,0 +1,18 @@ +# Copyright (C) 2016 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +from oeqa.core.case import OETestCase +from oeqa.core.decorator.oetag import OETestTag + +class TagTest(OETestCase): + + @OETestTag('goodTag') + def testTagGood(self): + self.assertTrue(True, msg='How is this possible?') + + @OETestTag('otherTag') + def testTagOther(self): + self.assertTrue(True, msg='How is this possible?') + + def testTagNone(self): + self.assertTrue(True, msg='How is this possible?') diff --git a/poky/meta/lib/oeqa/core/tests/cases/timeout.py b/poky/meta/lib/oeqa/core/tests/cases/timeout.py new file mode 100644 index 000000000..870c3157f --- /dev/null +++ b/poky/meta/lib/oeqa/core/tests/cases/timeout.py @@ -0,0 +1,18 @@ +# Copyright (C) 2016 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +from time import sleep + +from oeqa.core.case import OETestCase +from oeqa.core.decorator.oetimeout import OETimeout + +class TimeoutTest(OETestCase): + + @OETimeout(1) + def testTimeoutPass(self): + self.assertTrue(True, msg='How is this possible?') + + @OETimeout(1) + def testTimeoutFail(self): + sleep(2) + self.assertTrue(True, msg='How is this possible?') |