summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2016-11-09 11:57:54 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:05:18 +0000
commit9a5f285fe3ad6ae174e4efb053f7fa3971526da0 (patch)
treef6be404d31cd953a9a88ab135740a29fbfca948e /meta/lib
parent94cb20f20d1607702ff6668eeab81a39d0239bcb (diff)
downloadpoky-9a5f285fe3ad6ae174e4efb053f7fa3971526da0.tar.gz
oeqa/core/cases: Add example test cases
Serves as an first input of how to the OEQA framework works. (From OE-Core rev: 115f80adf1b230c5d0392e7833e9aeb274642bcb) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/core/cases/__init__.py0
-rw-r--r--meta/lib/oeqa/core/cases/example/data.json1
-rw-r--r--meta/lib/oeqa/core/cases/example/test_basic.py20
3 files changed, 21 insertions, 0 deletions
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
--- /dev/null
+++ b/meta/lib/oeqa/core/cases/__init__.py
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 @@
1# Copyright (C) 2016 Intel Corporation
2# Released under the MIT license (see COPYING.MIT)
3
4from oeqa.core.case import OETestCase
5from oeqa.core.decorator.depends import OETestDepends
6
7class OETestExample(OETestCase):
8 def test_example(self):
9 self.logger.info('IMAGE: %s' % self.td.get('IMAGE'))
10 self.assertEqual('core-image-minimal', self.td.get('IMAGE'))
11 self.logger.info('ARCH: %s' % self.td.get('ARCH'))
12 self.assertEqual('x86', self.td.get('ARCH'))
13
14class OETestExampleDepend(OETestCase):
15 @OETestDepends(['OETestExample.test_example'])
16 def test_example_depends(self):
17 pass
18
19 def test_example_no_depends(self):
20 pass