summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/bbtests.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/bbtests.py')
-rw-r--r--meta/lib/oeqa/selftest/bbtests.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index 7675563b45..4d9eec130a 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -3,7 +3,7 @@ import re
3 3
4import oeqa.utils.ftools as ftools 4import oeqa.utils.ftools as ftools
5from oeqa.selftest.base import oeSelfTest 5from oeqa.selftest.base import oeSelfTest
6from oeqa.utils.commands import runCmd, bitbake, get_bb_var 6from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
7from oeqa.utils.decorators import testcase 7from oeqa.utils.decorators import testcase
8 8
9class BitbakeTests(oeSelfTest): 9class BitbakeTests(oeSelfTest):
@@ -78,9 +78,10 @@ class BitbakeTests(oeSelfTest):
78 # test 1 from bug 5875 78 # test 1 from bug 5875
79 test_recipe = 'zlib' 79 test_recipe = 'zlib'
80 test_data = "Microsoft Made No Profit From Anyone's Zunes Yo" 80 test_data = "Microsoft Made No Profit From Anyone's Zunes Yo"
81 image_dir = get_bb_var('D', test_recipe) 81 bb_vars = get_bb_vars(['D', 'PKGDEST', 'mandir'], test_recipe)
82 pkgsplit_dir = get_bb_var('PKGDEST', test_recipe) 82 image_dir = bb_vars['D']
83 man_dir = get_bb_var('mandir', test_recipe) 83 pkgsplit_dir = bb_vars['PKGDEST']
84 man_dir = bb_vars['mandir']
84 85
85 bitbake('-c clean %s' % test_recipe) 86 bitbake('-c clean %s' % test_recipe)
86 bitbake('-c package -f %s' % test_recipe) 87 bitbake('-c package -f %s' % test_recipe)
@@ -121,8 +122,9 @@ class BitbakeTests(oeSelfTest):
121 @testcase(899) 122 @testcase(899)
122 def test_image_manifest(self): 123 def test_image_manifest(self):
123 bitbake('core-image-minimal') 124 bitbake('core-image-minimal')
124 deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal") 125 bb_vars = get_bb_vars(["DEPLOY_DIR_IMAGE", "IMAGE_LINK_NAME"], "core-image-minimal")
125 imagename = get_bb_var("IMAGE_LINK_NAME", target="core-image-minimal") 126 deploydir = bb_vars["DEPLOY_DIR_IMAGE"]
127 imagename = bb_vars["IMAGE_LINK_NAME"]
126 manifest = os.path.join(deploydir, imagename + ".manifest") 128 manifest = os.path.join(deploydir, imagename + ".manifest")
127 self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image. It should have been created in %s" % manifest) 129 self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image. It should have been created in %s" % manifest)
128 130
@@ -160,8 +162,9 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
160 result = bitbake('-c fetch aspell', ignore_status=True) 162 result = bitbake('-c fetch aspell', ignore_status=True)
161 self.delete_recipeinc('aspell') 163 self.delete_recipeinc('aspell')
162 self.assertEqual(result.status, 0, msg = "Couldn't fetch aspell. %s" % result.output) 164 self.assertEqual(result.status, 0, msg = "Couldn't fetch aspell. %s" % result.output)
163 self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz')), msg = "File rename failed. No corresponding test-aspell.tar.gz file found under %s" % str(get_bb_var("DL_DIR"))) 165 dl_dir = get_bb_var("DL_DIR")
164 self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz.done')), "File rename failed. No corresponding test-aspell.tar.gz.done file found under %s" % str(get_bb_var("DL_DIR"))) 166 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)
167 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)
165 168
166 @testcase(1028) 169 @testcase(1028)
167 def test_environment(self): 170 def test_environment(self):
@@ -253,8 +256,9 @@ INHERIT_remove = \"report-error\"
253 def test_bbappend_order(self): 256 def test_bbappend_order(self):
254 """ Bitbake should bbappend to recipe in a predictable order """ 257 """ Bitbake should bbappend to recipe in a predictable order """
255 test_recipe = 'ed' 258 test_recipe = 'ed'
256 test_recipe_summary_before = get_bb_var('SUMMARY', test_recipe) 259 bb_vars = get_bb_vars(['SUMMARY', 'PV'], test_recipe)
257 test_recipe_pv = get_bb_var('PV', test_recipe) 260 test_recipe_summary_before = bb_vars['SUMMARY']
261 test_recipe_pv = bb_vars['PV']
258 recipe_append_file = test_recipe + '_' + test_recipe_pv + '.bbappend' 262 recipe_append_file = test_recipe + '_' + test_recipe_pv + '.bbappend'
259 expected_recipe_summary = test_recipe_summary_before 263 expected_recipe_summary = test_recipe_summary_before
260 264