summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorDaniel Istrate <daniel.alexandrux.istrate@intel.com>2016-03-30 18:07:32 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-31 09:15:05 +0100
commitede11b6b4249282f034da589f419f851a209220f (patch)
tree09517a529e93d8815cb6709e34649943415629f7 /meta/lib/oeqa
parentccfe48cea2059569af62c43eef1412c2e7a5cbfd (diff)
downloadpoky-ede11b6b4249282f034da589f419f851a209220f.tar.gz
selftest: Added testcase decorator to tests
1418 test_recipetool_create_cmake 1422 test_qemu 1423 test_devtool_add_git_local 1433 test_devtool_upgrade_git 1434 test_sanity_unsafe_binary_references 1435 test_read_only_image (From OE-Core rev: f3b46fe73b68db96ba245fcead74dc070ab10518) Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/buildoptions.py2
-rw-r--r--meta/lib/oeqa/selftest/devtool.py2
-rw-r--r--meta/lib/oeqa/selftest/recipetool.py1
-rw-r--r--meta/lib/oeqa/selftest/wic.py1
4 files changed, 6 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index e9a5aaddd1..35d5dfd29a 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -57,6 +57,7 @@ class ImageOptionsTests(oeSelfTest):
57 res = runCmd("grep ccache %s" % (os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile")), ignore_status=True) 57 res = runCmd("grep ccache %s" % (os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile")), ignore_status=True)
58 self.assertEqual(0, res.status, msg="No match for ccache in m4 log.do_compile. For further details: %s" % os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile")) 58 self.assertEqual(0, res.status, msg="No match for ccache in m4 log.do_compile. For further details: %s" % os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile"))
59 59
60 @testcase(1435)
60 def test_read_only_image(self): 61 def test_read_only_image(self):
61 self.write_config('IMAGE_FEATURES += "read-only-rootfs"') 62 self.write_config('IMAGE_FEATURES += "read-only-rootfs"')
62 bitbake("core-image-sato") 63 bitbake("core-image-sato")
@@ -124,6 +125,7 @@ do_install_append_pn-gzip () {
124 line = self.getline(res, "QA Issue: gzip") 125 line = self.getline(res, "QA Issue: gzip")
125 self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output) 126 self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output)
126 127
128 @testcase(1434)
127 def test_sanity_unsafe_binary_references(self): 129 def test_sanity_unsafe_binary_references(self):
128 self.write_config('WARN_QA_append = " unsafe-references-in-binaries"') 130 self.write_config('WARN_QA_append = " unsafe-references-in-binaries"')
129 131
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 32025bed32..132a73d0ec 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -201,6 +201,7 @@ class DevtoolTests(DevtoolBase):
201 bindir = bindir[1:] 201 bindir = bindir[1:]
202 self.assertTrue(os.path.isfile(os.path.join(installdir, bindir, 'pv')), 'pv binary not found in D') 202 self.assertTrue(os.path.isfile(os.path.join(installdir, bindir, 'pv')), 'pv binary not found in D')
203 203
204 @testcase(1423)
204 def test_devtool_add_git_local(self): 205 def test_devtool_add_git_local(self):
205 # Fetch source from a remote URL, but do it outside of devtool 206 # Fetch source from a remote URL, but do it outside of devtool
206 tempdir = tempfile.mkdtemp(prefix='devtoolqa') 207 tempdir = tempfile.mkdtemp(prefix='devtoolqa')
@@ -1138,6 +1139,7 @@ class DevtoolTests(DevtoolBase):
1138 self.assertNotIn(recipe, result.output) 1139 self.assertNotIn(recipe, result.output)
1139 self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after resetting') 1140 self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after resetting')
1140 1141
1142 @testcase(1433)
1141 def test_devtool_upgrade_git(self): 1143 def test_devtool_upgrade_git(self):
1142 # Check preconditions 1144 # Check preconditions
1143 self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory') 1145 self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
diff --git a/meta/lib/oeqa/selftest/recipetool.py b/meta/lib/oeqa/selftest/recipetool.py
index a04ee87db2..e72911b0aa 100644
--- a/meta/lib/oeqa/selftest/recipetool.py
+++ b/meta/lib/oeqa/selftest/recipetool.py
@@ -424,6 +424,7 @@ class RecipetoolTests(RecipetoolBase):
424 inherits = ['autotools'] 424 inherits = ['autotools']
425 self._test_recipe_contents(os.path.join(temprecipe, dirlist[0]), checkvars, inherits) 425 self._test_recipe_contents(os.path.join(temprecipe, dirlist[0]), checkvars, inherits)
426 426
427 @testcase(1418)
427 def test_recipetool_create_cmake(self): 428 def test_recipetool_create_cmake(self):
428 # Try adding a recipe 429 # Try adding a recipe
429 temprecipe = os.path.join(self.tempdir, 'recipe') 430 temprecipe = os.path.join(self.tempdir, 'recipe')
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 56ce8c83de..a569fbf747 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -266,6 +266,7 @@ class Wic(oeSelfTest):
266 % image).status) 266 % image).status)
267 self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image))) 267 self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
268 268
269 @testcase(1422)
269 def test_qemu(self): 270 def test_qemu(self):
270 """Test wic-image-minimal under qemu""" 271 """Test wic-image-minimal under qemu"""
271 self.assertEqual(0, bitbake('wic-image-minimal').status) 272 self.assertEqual(0, bitbake('wic-image-minimal').status)