mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 12:49:34 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
94cb20f20d
commit
9a5f285fe3
0
meta/lib/oeqa/core/cases/__init__.py
Normal file
0
meta/lib/oeqa/core/cases/__init__.py
Normal file
1
meta/lib/oeqa/core/cases/example/data.json
Normal file
1
meta/lib/oeqa/core/cases/example/data.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"ARCH": "x86", "IMAGE": "core-image-minimal"}
|
||||||
20
meta/lib/oeqa/core/cases/example/test_basic.py
Normal file
20
meta/lib/oeqa/core/cases/example/test_basic.py
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user