summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/__init__.py2
-rw-r--r--meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py (renamed from meta/lib/oeqa/selftest/_sstatetests_noauto.py)7
-rw-r--r--meta/lib/oeqa/selftest/cases/archiver.py (renamed from meta/lib/oeqa/selftest/archiver.py)14
-rw-r--r--meta/lib/oeqa/selftest/cases/bblayers.py (renamed from meta/lib/oeqa/selftest/bblayers.py)24
-rw-r--r--meta/lib/oeqa/selftest/cases/bbtests.py (renamed from meta/lib/oeqa/selftest/bbtests.py)57
-rw-r--r--meta/lib/oeqa/selftest/cases/buildhistory.py (renamed from meta/lib/oeqa/selftest/buildhistory.py)5
-rw-r--r--meta/lib/oeqa/selftest/cases/buildoptions.py (renamed from meta/lib/oeqa/selftest/buildoptions.py)34
-rw-r--r--meta/lib/oeqa/selftest/cases/containerimage.py (renamed from meta/lib/oeqa/selftest/containerimage.py)4
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py (renamed from meta/lib/oeqa/selftest/devtool.py)68
-rw-r--r--meta/lib/oeqa/selftest/cases/eSDK.py (renamed from meta/lib/oeqa/selftest/eSDK.py)18
-rw-r--r--meta/lib/oeqa/selftest/cases/image_typedep.py (renamed from meta/lib/oeqa/selftest/image_typedep.py)4
-rw-r--r--meta/lib/oeqa/selftest/cases/imagefeatures.py (renamed from meta/lib/oeqa/selftest/imagefeatures.py)16
-rw-r--r--meta/lib/oeqa/selftest/cases/layerappend.py (renamed from meta/lib/oeqa/selftest/layerappend.py)15
-rw-r--r--meta/lib/oeqa/selftest/cases/liboe.py (renamed from meta/lib/oeqa/selftest/liboe.py)7
-rw-r--r--meta/lib/oeqa/selftest/cases/lic_checksum.py (renamed from meta/lib/oeqa/selftest/lic-checksum.py)8
-rw-r--r--meta/lib/oeqa/selftest/cases/manifest.py (renamed from meta/lib/oeqa/selftest/manifest.py)52
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/__init__.py (renamed from meta/lib/oeqa/selftest/oelib/__init__.py)0
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/buildhistory.py (renamed from meta/lib/oeqa/selftest/oelib/buildhistory.py)4
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/elf.py (renamed from meta/lib/oeqa/selftest/oelib/elf.py)4
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/license.py (renamed from meta/lib/oeqa/selftest/oelib/license.py)6
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/path.py (renamed from meta/lib/oeqa/selftest/oelib/path.py)4
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/types.py (renamed from meta/lib/oeqa/selftest/oelib/types.py)6
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/utils.py (renamed from meta/lib/oeqa/selftest/oelib/utils.py)6
-rw-r--r--meta/lib/oeqa/selftest/cases/oescripts.py (renamed from meta/lib/oeqa/selftest/oescripts.py)15
-rw-r--r--meta/lib/oeqa/selftest/cases/package.py (renamed from meta/lib/oeqa/selftest/package.py)4
-rw-r--r--meta/lib/oeqa/selftest/cases/pkgdata.py (renamed from meta/lib/oeqa/selftest/pkgdata.py)29
-rw-r--r--meta/lib/oeqa/selftest/cases/prservice.py (renamed from meta/lib/oeqa/selftest/prservice.py)27
-rw-r--r--meta/lib/oeqa/selftest/cases/recipetool.py (renamed from meta/lib/oeqa/selftest/recipetool.py)81
-rw-r--r--meta/lib/oeqa/selftest/cases/runqemu.py (renamed from meta/lib/oeqa/selftest/runqemu.py)31
-rw-r--r--meta/lib/oeqa/selftest/cases/runtime_test.py (renamed from meta/lib/oeqa/selftest/runtime-test.py)15
-rw-r--r--meta/lib/oeqa/selftest/cases/signing.py (renamed from meta/lib/oeqa/selftest/signing.py)15
-rw-r--r--meta/lib/oeqa/selftest/cases/sstate.py (renamed from meta/lib/oeqa/selftest/sstate.py)5
-rw-r--r--meta/lib/oeqa/selftest/cases/sstatetests.py (renamed from meta/lib/oeqa/selftest/sstatetests.py)46
-rw-r--r--meta/lib/oeqa/selftest/cases/tinfoil.py (renamed from meta/lib/oeqa/selftest/tinfoil.py)25
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py (renamed from meta/lib/oeqa/selftest/wic.py)84
35 files changed, 355 insertions, 387 deletions
diff --git a/meta/lib/oeqa/selftest/__init__.py b/meta/lib/oeqa/selftest/__init__.py
deleted file mode 100644
index 3ad9513f40..0000000000
--- a/meta/lib/oeqa/selftest/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from pkgutil import extend_path
-__path__ = extend_path(__path__, __name__)
diff --git a/meta/lib/oeqa/selftest/_sstatetests_noauto.py b/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
index fc9ae7efb9..0e5896234c 100644
--- a/meta/lib/oeqa/selftest/_sstatetests_noauto.py
+++ b/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
@@ -1,19 +1,16 @@
-import datetime
-import unittest
import os
-import re
import shutil
import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
-from oeqa.selftest.sstate import SStateBase
+from oeqa.selftest.cases.sstate import SStateBase
class RebuildFromSState(SStateBase):
@classmethod
def setUpClass(self):
+ super(RebuildFromSState, self).setUpClass()
self.builddir = os.path.join(os.environ.get('BUILDDIR'))
def get_dep_targets(self, primary_targets):
diff --git a/meta/lib/oeqa/selftest/archiver.py b/meta/lib/oeqa/selftest/cases/archiver.py
index d7f215cbf6..70c7282f22 100644
--- a/meta/lib/oeqa/selftest/archiver.py
+++ b/meta/lib/oeqa/selftest/cases/archiver.py
@@ -1,14 +1,12 @@
-from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import bitbake, get_bb_vars
-from oeqa.utils.decorators import testcase
-import glob
import os
-import shutil
-
+import glob
+from oeqa.utils.commands import bitbake, get_bb_vars
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.core.decorator.oeid import OETestID
-class Archiver(oeSelfTest):
+class Archiver(OESelftestTestCase):
- @testcase(1345)
+ @OETestID(1345)
def test_archiver_allows_to_filter_on_recipe_name(self):
"""
Summary: The archiver should offer the possibility to filter on the recipe. (#6929)
diff --git a/meta/lib/oeqa/selftest/bblayers.py b/meta/lib/oeqa/selftest/cases/bblayers.py
index cd658c5d4e..90a2249b08 100644
--- a/meta/lib/oeqa/selftest/bblayers.py
+++ b/meta/lib/oeqa/selftest/cases/bblayers.py
@@ -1,39 +1,37 @@
-import unittest
import os
-import logging
import re
-import shutil
import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, get_bb_var
-from oeqa.utils.decorators import testcase
-class BitbakeLayers(oeSelfTest):
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.core.decorator.oeid import OETestID
- @testcase(756)
+class BitbakeLayers(OESelftestTestCase):
+
+ @OETestID(756)
def test_bitbakelayers_showcrossdepends(self):
result = runCmd('bitbake-layers show-cross-depends')
self.assertTrue('aspell' in result.output, msg = "No dependencies were shown. bitbake-layers show-cross-depends output: %s" % result.output)
- @testcase(83)
+ @OETestID(83)
def test_bitbakelayers_showlayers(self):
result = runCmd('bitbake-layers show-layers')
self.assertTrue('meta-selftest' in result.output, msg = "No layers were shown. bitbake-layers show-layers output: %s" % result.output)
- @testcase(93)
+ @OETestID(93)
def test_bitbakelayers_showappends(self):
recipe = "xcursor-transparent-theme"
bb_file = self.get_recipe_basename(recipe)
result = runCmd('bitbake-layers show-appends')
self.assertTrue(bb_file in result.output, msg="%s file was not recognised. bitbake-layers show-appends output: %s" % (bb_file, result.output))
- @testcase(90)
+ @OETestID(90)
def test_bitbakelayers_showoverlayed(self):
result = runCmd('bitbake-layers show-overlayed')
self.assertTrue('aspell' in result.output, msg="aspell overlayed recipe was not recognised bitbake-layers show-overlayed %s" % result.output)
- @testcase(95)
+ @OETestID(95)
def test_bitbakelayers_flatten(self):
recipe = "xcursor-transparent-theme"
recipe_path = "recipes-graphics/xcursor-transparent-theme"
@@ -48,7 +46,7 @@ class BitbakeLayers(oeSelfTest):
find_in_contents = re.search("##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents)
self.assertTrue(find_in_contents, msg = "Flattening layers did not work. bitbake-layers flatten output: %s" % result.output)
- @testcase(1195)
+ @OETestID(1195)
def test_bitbakelayers_add_remove(self):
test_layer = os.path.join(get_bb_var('COREBASE'), 'meta-skeleton')
result = runCmd('bitbake-layers show-layers')
@@ -66,7 +64,7 @@ class BitbakeLayers(oeSelfTest):
result = runCmd('bitbake-layers show-layers')
self.assertNotIn('meta-skeleton', result.output, msg = "meta-skeleton should have been removed at this step. bitbake-layers show-layers output: %s" % result.output)
- @testcase(1384)
+ @OETestID(1384)
def test_bitbakelayers_showrecipes(self):
result = runCmd('bitbake-layers show-recipes')
self.assertIn('aspell:', result.output)
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index 46e09f509f..4c82049032 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -2,30 +2,31 @@ import os
import re
import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
-from oeqa.utils.decorators import testcase
-class BitbakeTests(oeSelfTest):
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.core.decorator.oeid import OETestID
+
+class BitbakeTests(OESelftestTestCase):
def getline(self, res, line):
for l in res.output.split('\n'):
if line in l:
return l
- @testcase(789)
+ @OETestID(789)
def test_run_bitbake_from_dir_1(self):
os.chdir(os.path.join(self.builddir, 'conf'))
self.assertEqual(bitbake('-e').status, 0, msg = "bitbake couldn't run from \"conf\" dir")
- @testcase(790)
+ @OETestID(790)
def test_run_bitbake_from_dir_2(self):
my_env = os.environ.copy()
my_env['BBPATH'] = my_env['BUILDDIR']
os.chdir(os.path.dirname(os.environ['BUILDDIR']))
self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake couldn't run from builddir")
- @testcase(806)
+ @OETestID(806)
def test_event_handler(self):
self.write_config("INHERIT += \"test_events\"")
result = bitbake('m4-native')
@@ -35,7 +36,7 @@ class BitbakeTests(oeSelfTest):
self.assertTrue(find_build_completed, msg = "Match failed in:\n%s" % result.output)
self.assertFalse('Test for bb.event.InvalidEvent' in result.output, msg = "\"Test for bb.event.InvalidEvent\" message found during bitbake process. bitbake output: %s" % result.output)
- @testcase(103)
+ @OETestID(103)
def test_local_sstate(self):
bitbake('m4-native')
bitbake('m4-native -cclean')
@@ -43,17 +44,17 @@ class BitbakeTests(oeSelfTest):
find_setscene = re.search("m4-native.*do_.*_setscene", result.output)
self.assertTrue(find_setscene, msg = "No \"m4-native.*do_.*_setscene\" message found during bitbake m4-native. bitbake output: %s" % result.output )
- @testcase(105)
+ @OETestID(105)
def test_bitbake_invalid_recipe(self):
result = bitbake('-b asdf', ignore_status=True)
self.assertTrue("ERROR: Unable to find any recipe file matching 'asdf'" in result.output, msg = "Though asdf recipe doesn't exist, bitbake didn't output any err. message. bitbake output: %s" % result.output)
- @testcase(107)
+ @OETestID(107)
def test_bitbake_invalid_target(self):
result = bitbake('asdf', ignore_status=True)
self.assertTrue("ERROR: Nothing PROVIDES 'asdf'" in result.output, msg = "Though no 'asdf' target exists, bitbake didn't output any err. message. bitbake output: %s" % result.output)
- @testcase(106)
+ @OETestID(106)
def test_warnings_errors(self):
result = bitbake('-b asdf', ignore_status=True)
find_warnings = re.search("Summary: There w.{2,3}? [1-9][0-9]* WARNING messages* shown", result.output)
@@ -61,7 +62,7 @@ class BitbakeTests(oeSelfTest):
self.assertTrue(find_warnings, msg="Did not find the mumber of warnings at the end of the build:\n" + result.output)
self.assertTrue(find_errors, msg="Did not find the mumber of errors at the end of the build:\n" + result.output)
- @testcase(108)
+ @OETestID(108)
def test_invalid_patch(self):
# This patch already exists in SRC_URI so adding it again will cause the
# patch to fail.
@@ -73,7 +74,7 @@ class BitbakeTests(oeSelfTest):
line = self.getline(result, "Function failed: patch_do_patch")
self.assertTrue(line and line.startswith("ERROR:"), msg = "Repeated patch application didn't fail. bitbake output: %s" % result.output)
- @testcase(1354)
+ @OETestID(1354)
def test_force_task_1(self):
# test 1 from bug 5875
test_recipe = 'zlib'
@@ -98,7 +99,7 @@ class BitbakeTests(oeSelfTest):
ret = bitbake(test_recipe)
self.assertIn('task do_package_write_rpm:', ret.output, 'Task do_package_write_rpm did not re-executed.')
- @testcase(163)
+ @OETestID(163)
def test_force_task_2(self):
# test 2 from bug 5875
test_recipe = 'zlib'
@@ -111,7 +112,7 @@ class BitbakeTests(oeSelfTest):
for task in look_for_tasks:
self.assertIn(task, result.output, msg="Couldn't find %s task.")
- @testcase(167)
+ @OETestID(167)
def test_bitbake_g(self):
result = bitbake('-g core-image-minimal')
for f in ['pn-buildlist', 'recipe-depends.dot', 'task-depends.dot']:
@@ -119,7 +120,7 @@ class BitbakeTests(oeSelfTest):
self.assertTrue('Task dependencies saved to \'task-depends.dot\'' in result.output, msg = "No task dependency \"task-depends.dot\" file was generated for the given task target. bitbake output: %s" % result.output)
self.assertTrue('busybox' in ftools.read_file(os.path.join(self.builddir, 'task-depends.dot')), msg = "No \"busybox\" dependency found in task-depends.dot file.")
- @testcase(899)
+ @OETestID(899)
def test_image_manifest(self):
bitbake('core-image-minimal')
bb_vars = get_bb_vars(["DEPLOY_DIR_IMAGE", "IMAGE_LINK_NAME"], "core-image-minimal")
@@ -128,7 +129,7 @@ class BitbakeTests(oeSelfTest):
manifest = os.path.join(deploydir, imagename + ".manifest")
self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image. It should have been created in %s" % manifest)
- @testcase(168)
+ @OETestID(168)
def test_invalid_recipe_src_uri(self):
data = 'SRC_URI = "file://invalid"'
self.write_recipeinc('man', data)
@@ -149,7 +150,7 @@ doesn't exist, yet no error message encountered. bitbake output: %s" % result.ou
self.assertTrue(line and line.startswith("ERROR:"), msg = "\"invalid\" file \
doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result.output)
- @testcase(171)
+ @OETestID(171)
def test_rename_downloaded_file(self):
# TODO unique dldir instead of using cleanall
# TODO: need to set sstatedir?
@@ -167,29 +168,29 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
self.assertTrue(os.path.isfile(os.path.join(dl_dir, 'test-aspell.tar.gz')), msg = "File rename failed. No corresponding test-aspell.tar.gz file found under %s" % dl_dir)
self.assertTrue(os.path.isfile(os.path.join(dl_dir, 'test-aspell.tar.gz.done')), "File rename failed. No corresponding test-aspell.tar.gz.done file found under %s" % dl_dir)
- @testcase(1028)
+ @OETestID(1028)
def test_environment(self):
self.write_config("TEST_ENV=\"localconf\"")
result = runCmd('bitbake -e | grep TEST_ENV=')
self.assertTrue('localconf' in result.output, msg = "bitbake didn't report any value for TEST_ENV variable. To test, run 'bitbake -e | grep TEST_ENV='")
- @testcase(1029)
+ @OETestID(1029)
def test_dry_run(self):
result = runCmd('bitbake -n m4-native')
self.assertEqual(0, result.status, "bitbake dry run didn't run as expected. %s" % result.output)
- @testcase(1030)
+ @OETestID(1030)
def test_just_parse(self):
result = runCmd('bitbake -p')
self.assertEqual(0, result.status, "errors encountered when parsing recipes. %s" % result.output)
- @testcase(1031)
+ @OETestID(1031)
def test_version(self):
result = runCmd('bitbake -s | grep wget')
find = re.search("wget *:([0-9a-zA-Z\.\-]+)", result.output)
self.assertTrue(find, "No version returned for searched recipe. bitbake output: %s" % result.output)
- @testcase(1032)
+ @OETestID(1032)
def test_prefile(self):
preconf = os.path.join(self.builddir, 'conf/prefile.conf')
self.track_for_cleanup(preconf)
@@ -200,7 +201,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=')
self.assertTrue('localconf' in result.output, "Preconfigure file \"prefile.conf\"was not taken into consideration.")
- @testcase(1033)
+ @OETestID(1033)
def test_postfile(self):
postconf = os.path.join(self.builddir, 'conf/postfile.conf')
self.track_for_cleanup(postconf)
@@ -209,12 +210,12 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=')
self.assertTrue('postfile' in result.output, "Postconfigure file \"postfile.conf\"was not taken into consideration.")
- @testcase(1034)
+ @OETestID(1034)
def test_checkuri(self):
result = runCmd('bitbake -c checkuri m4')
self.assertEqual(0, result.status, msg = "\"checkuri\" task was not executed. bitbake output: %s" % result.output)
- @testcase(1035)
+ @OETestID(1035)
def test_continue(self):
self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
SSTATE_DIR = \"${TOPDIR}/download-selftest\"
@@ -229,7 +230,7 @@ INHERIT_remove = \"report-error\"
continuepos = result.output.find('NOTE: recipe xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1))
self.assertLess(errorpos,continuepos, msg = "bitbake didn't pass do_fail_task. bitbake output: %s" % result.output)
- @testcase(1119)
+ @OETestID(1119)
def test_non_gplv3(self):
self.write_config('INCOMPATIBLE_LICENSE = "GPLv3"')
result = bitbake('selftest-ed', ignore_status=True)
@@ -238,7 +239,7 @@ INHERIT_remove = \"report-error\"
self.assertFalse(os.path.isfile(os.path.join(lic_dir, 'selftest-ed/generic_GPLv3')))
self.assertTrue(os.path.isfile(os.path.join(lic_dir, 'selftest-ed/generic_GPLv2')))
- @testcase(1422)
+ @OETestID(1422)
def test_setscene_only(self):
""" Bitbake option to restore from sstate only within a build (i.e. execute no real tasks, only setscene)"""
test_recipe = 'ed'
@@ -253,7 +254,7 @@ INHERIT_remove = \"report-error\"
self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n'
'Executed tasks were: %s' % (task, str(tasks)))
- @testcase(1425)
+ @OETestID(1425)
def test_bbappend_order(self):
""" Bitbake should bbappend to recipe in a predictable order """
test_recipe = 'ed'
diff --git a/meta/lib/oeqa/selftest/buildhistory.py b/meta/lib/oeqa/selftest/cases/buildhistory.py
index 008c39c956..06792d9146 100644
--- a/meta/lib/oeqa/selftest/buildhistory.py
+++ b/meta/lib/oeqa/selftest/cases/buildhistory.py
@@ -2,12 +2,11 @@ import os
import re
import datetime
-from oeqa.selftest.base import oeSelfTest
+from oeqa.selftest.case import OESelftestTestCase
from oeqa.utils.commands import bitbake, get_bb_vars
-from oeqa.utils.decorators import testcase
-class BuildhistoryBase(oeSelfTest):
+class BuildhistoryBase(OESelftestTestCase):
def config_buildhistory(self, tmp_bh_location=False):
bb_vars = get_bb_vars(['USER_CLASSES', 'INHERIT'])
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py
index ce37ea457c..1f1bb7ae63 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -3,15 +3,15 @@ import re
import glob as g
import shutil
import tempfile
-from oeqa.selftest.base import oeSelfTest
-from oeqa.selftest.buildhistory import BuildhistoryBase
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.selftest.cases.buildhistory import BuildhistoryBase
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
import oeqa.utils.ftools as ftools
-from oeqa.utils.decorators import testcase
+from oeqa.core.decorator.oeid import OETestID
-class ImageOptionsTests(oeSelfTest):
+class ImageOptionsTests(OESelftestTestCase):
- @testcase(761)
+ @OETestID(761)
def test_incremental_image_generation(self):
image_pkgtype = get_bb_var("IMAGE_PKGTYPE")
if image_pkgtype != 'rpm':
@@ -30,7 +30,7 @@ class ImageOptionsTests(oeSelfTest):
incremental_removed = re.search(r"Erasing\s*:\s*packagegroup-core-ssh-openssh", log_data_removed)
self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed)
- @testcase(286)
+ @OETestID(286)
def test_ccache_tool(self):
bitbake("ccache-native")
bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'bindir'], 'ccache-native')
@@ -43,7 +43,7 @@ class ImageOptionsTests(oeSelfTest):
res = runCmd("grep ccache %s" % log_compile, ignore_status=True)
self.assertEqual(0, res.status, msg="No match for ccache in m4 log.do_compile. For further details: %s" % log_compile)
- @testcase(1435)
+ @OETestID(1435)
def test_read_only_image(self):
distro_features = get_bb_var('DISTRO_FEATURES')
if not ('x11' in distro_features and 'opengl' in distro_features):
@@ -52,9 +52,9 @@ class ImageOptionsTests(oeSelfTest):
bitbake("core-image-sato")
# do_image will fail if there are any pending postinsts
-class DiskMonTest(oeSelfTest):
+class DiskMonTest(OESelftestTestCase):
- @testcase(277)
+ @OETestID(277)
def test_stoptask_behavior(self):
self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"')
res = bitbake("m4", ignore_status = True)
@@ -68,13 +68,13 @@ class DiskMonTest(oeSelfTest):
res = bitbake("m4")
self.assertTrue('WARNING: The free space' in res.output, msg = "A warning should have been displayed for disk monitor is set to WARN: %s" %res.output)
-class SanityOptionsTest(oeSelfTest):
+class SanityOptionsTest(OESelftestTestCase):
def getline(self, res, line):
for l in res.output.split('\n'):
if line in l:
return l
- @testcase(927)
+ @OETestID(927)
def test_options_warnqa_errorqa_switch(self):
self.write_config("INHERIT_remove = \"report-error\"")
@@ -96,7 +96,7 @@ class SanityOptionsTest(oeSelfTest):
line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
self.assertTrue(line and line.startswith("WARNING:"), msg=res.output)
- @testcase(278)
+ @OETestID(278)
def test_sanity_unsafe_script_references(self):
self.write_config('WARN_QA_append = " unsafe-references-in-scripts"')
@@ -114,7 +114,7 @@ do_install_append_pn-gzip () {
line = self.getline(res, "QA Issue: gzip")
self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output)
- @testcase(1421)
+ @OETestID(1421)
def test_layer_without_git_dir(self):
"""
Summary: Test that layer git revisions are displayed and do not fail without git repository
@@ -156,20 +156,20 @@ do_install_append_pn-gzip () {
class BuildhistoryTests(BuildhistoryBase):
- @testcase(293)
+ @OETestID(293)
def test_buildhistory_basic(self):
self.run_buildhistory_operation('xcursor-transparent-theme')
self.assertTrue(os.path.isdir(get_bb_var('BUILDHISTORY_DIR')), "buildhistory dir was not created.")
- @testcase(294)
+ @OETestID(294)
def test_buildhistory_buildtime_pr_backwards(self):
target = 'xcursor-transparent-theme'
error = "ERROR:.*QA Issue: Package version for package %s went backwards which would break package feeds from (.*-r1.* to .*-r0.*)" % target
self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True)
self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True, error_regex=error)
-class ArchiverTest(oeSelfTest):
- @testcase(926)
+class ArchiverTest(OESelftestTestCase):
+ @OETestID(926)
def test_arch_work_dir_and_export_source(self):
"""
Test for archiving the work directory and exporting the source files.
diff --git a/meta/lib/oeqa/selftest/containerimage.py b/meta/lib/oeqa/selftest/cases/containerimage.py
index def481f144..73162fa600 100644
--- a/meta/lib/oeqa/selftest/containerimage.py
+++ b/meta/lib/oeqa/selftest/cases/containerimage.py
@@ -1,6 +1,6 @@
import os
-from oeqa.selftest.base import oeSelfTest
+from oeqa.selftest.case import OESelftestTestCase
from oeqa.utils.commands import bitbake, get_bb_vars, runCmd
# This test builds an image with using the "container" IMAGE_FSTYPE, and
@@ -16,7 +16,7 @@ from oeqa.utils.commands import bitbake, get_bb_vars, runCmd
# of them, but this test is more to catch if other packages get added by
# default other than what is in ROOTFS_BOOTSTRAP_INSTALL.
#
-class ContainerImageTests(oeSelfTest):
+class ContainerImageTests(OESelftestTestCase):
# Verify that when specifying a IMAGE_TYPEDEP_ of the form "foo.bar" that
# the conversion type bar gets added as a dep as well
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 39f3543417..75340d6d7b 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -1,6 +1,4 @@
-import unittest
import os
-import logging
import re
import shutil
import tempfile
@@ -8,12 +6,12 @@ import glob
import fnmatch
import oeqa.utils.ftools as ftools
-from oeqa.selftest.base import oeSelfTest
+from oeqa.selftest.case import OESelftestTestCase
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
from oeqa.utils.commands import get_bb_vars, runqemu, get_test_layer
-from oeqa.utils.decorators import testcase
+from oeqa.core.decorator.oeid import OETestID
-class DevtoolBase(oeSelfTest):
+class DevtoolBase(OESelftestTestCase):
def _test_recipe_contents(self, recipefile, checkvars, checkinherits):
with open(recipefile, 'r') as f:
@@ -120,6 +118,7 @@ class DevtoolTests(DevtoolBase):
@classmethod
def setUpClass(cls):
+ super(DevtoolTests, cls).setUpClass()
bb_vars = get_bb_vars(['TOPDIR', 'SSTATE_DIR'])
cls.original_sstate = bb_vars['SSTATE_DIR']
cls.devtool_sstate = os.path.join(bb_vars['TOPDIR'], 'sstate_devtool')
@@ -129,8 +128,9 @@ class DevtoolTests(DevtoolBase):
@classmethod
def tearDownClass(cls):
- cls.log.debug('Deleting devtool sstate cache on %s' % cls.devtool_sstate)
+ cls.logger.debug('Deleting devtool sstate cache on %s' % cls.devtool_sstate)
runCmd('rm -rf %s' % cls.devtool_sstate)
+ super(DevtoolTests, cls).tearDownClass()
def setUp(self):
"""Test case setup function"""
@@ -168,7 +168,7 @@ class DevtoolTests(DevtoolBase):
if expected_status:
self.fail('Missing file changes: %s' % expected_status)
- @testcase(1158)
+ @OETestID(1158)
def test_create_workspace(self):
# Check preconditions
result = runCmd('bitbake-layers show-layers')
@@ -189,7 +189,7 @@ class DevtoolTests(DevtoolBase):
self.assertNotIn(tempdir, result.output)
self.assertIn(self.workspacedir, result.output)
- @testcase(1159)
+ @OETestID(1159)
def test_devtool_add(self):
# Fetch source
tempdir = tempfile.mkdtemp(prefix='devtoolqa')
@@ -222,7 +222,7 @@ class DevtoolTests(DevtoolBase):
bindir = bindir[1:]
self.assertTrue(os.path.isfile(os.path.join(installdir, bindir, 'pv')), 'pv binary not found in D')
- @testcase(1423)
+ @OETestID(1423)
def test_devtool_add_git_local(self):
# Fetch source from a remote URL, but do it outside of devtool
tempdir = tempfile.mkdtemp(prefix='devtoolqa')
@@ -262,7 +262,7 @@ class DevtoolTests(DevtoolBase):
checkvars['DEPENDS'] = set(['dbus'])
self._test_recipe_contents(recipefile, checkvars, [])
- @testcase(1162)
+ @OETestID(1162)
def test_devtool_add_library(self):
# Fetch source
tempdir = tempfile.mkdtemp(prefix='devtoolqa')
@@ -311,7 +311,7 @@ class DevtoolTests(DevtoolBase):
self.assertFalse(matches, 'Stamp files exist for recipe libftdi that should have been cleaned')
self.assertFalse(os.path.isfile(os.path.join(staging_libdir, 'libftdi1.so.2.1.0')), 'libftdi binary still found in STAGING_LIBDIR after cleaning')
- @testcase(1160)
+ @OETestID(1160)
def test_devtool_add_fetch(self):
# Fetch source
tempdir = tempfile.mkdtemp(prefix='devtoolqa')
@@ -357,7 +357,7 @@ class DevtoolTests(DevtoolBase):
checkvars['SRC_URI'] = url
self._test_recipe_contents(recipefile, checkvars, [])
- @testcase(1161)
+ @OETestID(1161)
def test_devtool_add_fetch_git(self):
tempdir = tempfile.mkdtemp(prefix='devtoolqa')
self.track_for_cleanup(tempdir)
@@ -405,7 +405,7 @@ class DevtoolTests(DevtoolBase):
checkvars['SRCREV'] = checkrev
self._test_recipe_contents(recipefile, checkvars, [])
- @testcase(1391)
+ @OETestID(1391)
def test_devtool_add_fetch_simple(self):
# Fetch source from a remote URL, auto-detecting name
tempdir = tempfile.mkdtemp(prefix='devtoolqa')
@@ -433,7 +433,7 @@ class DevtoolTests(DevtoolBase):
checkvars['SRC_URI'] = url.replace(testver, '${PV}')
self._test_recipe_contents(recipefile, checkvars, [])
- @testcase(1164)
+ @OETestID(1164)
def test_devtool_modify(self):
import oe.path
@@ -537,7 +537,7 @@ class DevtoolTests(DevtoolBase):
finally:
self.delete_recipeinc('m4')
- @testcase(1166)
+ @OETestID(1166)