From 9a5f285fe3ad6ae174e4efb053f7fa3971526da0 Mon Sep 17 00:00:00 2001 From: Aníbal Limón Date: Wed, 9 Nov 2016 11:57:54 -0600 Subject: oeqa/core/cases: Add example test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Serves as an first input of how to the OEQA framework works. (From OE-Core rev: 115f80adf1b230c5d0392e7833e9aeb274642bcb) Signed-off-by: Aníbal Limón Signed-off-by: Mariano Lopez Signed-off-by: Richard Purdie --- meta/lib/oeqa/core/cases/__init__.py | 0 meta/lib/oeqa/core/cases/example/data.json | 1 + meta/lib/oeqa/core/cases/example/test_basic.py | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 meta/lib/oeqa/core/cases/__init__.py create mode 100644 meta/lib/oeqa/core/cases/example/data.json create mode 100644 meta/lib/oeqa/core/cases/example/test_basic.py (limited to 'meta/lib/oeqa/core/cases') diff --git a/meta/lib/oeqa/core/cases/__init__.py b/meta/lib/oeqa/core/cases/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/meta/lib/oeqa/core/cases/example/data.json b/meta/lib/oeqa/core/cases/example/data.json new file mode 100644 index 0000000000..21d6b16d17 --- /dev/null +++ b/meta/lib/oeqa/core/cases/example/data.json @@ -0,0 +1 @@ +{"ARCH": "x86", "IMAGE": "core-image-minimal"} \ No newline at end of file diff --git a/meta/lib/oeqa/core/cases/example/test_basic.py b/meta/lib/oeqa/core/cases/example/test_basic.py new file mode 100644 index 0000000000..11cf3800cc --- /dev/null +++ b/meta/lib/oeqa/core/cases/example/test_basic.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.depends import OETestDepends + +class OETestExample(OETestCase): + def test_example(self): + self.logger.info('IMAGE: %s' % self.td.get('IMAGE')) + self.assertEqual('core-image-minimal', self.td.get('IMAGE')) + self.logger.info('ARCH: %s' % self.td.get('ARCH')) + self.assertEqual('x86', self.td.get('ARCH')) + +class OETestExampleDepend(OETestCase): + @OETestDepends(['OETestExample.test_example']) + def test_example_depends(self): + pass + + def test_example_no_depends(self): + pass -- cgit v1.2.3-54-g00ecf