summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 88d69724f9..c17131a56d 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -194,26 +194,35 @@ class DevtoolTests(DevtoolBase):
194 # Fetch source 194 # Fetch source
195 tempdir = tempfile.mkdtemp(prefix='devtoolqa') 195 tempdir = tempfile.mkdtemp(prefix='devtoolqa')
196 self.track_for_cleanup(tempdir) 196 self.track_for_cleanup(tempdir)
197 pn = 'pv'
198 pv = '1.5.3'
197 url = 'http://www.ivarch.com/programs/sources/pv-1.5.3.tar.bz2' 199 url = 'http://www.ivarch.com/programs/sources/pv-1.5.3.tar.bz2'
198 result = runCmd('wget %s' % url, cwd=tempdir) 200 result = runCmd('wget %s' % url, cwd=tempdir)
199 result = runCmd('tar xfv pv-1.5.3.tar.bz2', cwd=tempdir) 201 result = runCmd('tar xfv %s' % os.path.basename(url), cwd=tempdir)
200 srcdir = os.path.join(tempdir, 'pv-1.5.3') 202 srcdir = os.path.join(tempdir, '%s-%s' % (pn, pv))
201 self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure')), 'Unable to find configure script in source directory') 203 self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure')), 'Unable to find configure script in source directory')
202 # Test devtool add 204 # Test devtool add
203 self.track_for_cleanup(self.workspacedir) 205 self.track_for_cleanup(self.workspacedir)
204 self.add_command_to_tearDown('bitbake -c cleansstate pv') 206 self.add_command_to_tearDown('bitbake -c cleansstate %s' % pn)
205 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') 207 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
206 result = runCmd('devtool add pv %s' % srcdir) 208 result = runCmd('devtool add %s %s' % (pn, srcdir))
207 self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created') 209 self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), 'Workspace directory not created')
208 # Test devtool status 210 # Test devtool status
209 result = runCmd('devtool status') 211 result = runCmd('devtool status')
210 self.assertIn('pv', result.output) 212 recipepath = '%s/recipes/%s/%s_%s.bb' % (self.workspacedir, pn, pn, pv)
213 self.assertIn(recipepath, result.output)
211 self.assertIn(srcdir, result.output) 214 self.assertIn(srcdir, result.output)
215 # Test devtool find-recipe
216 result = runCmd('devtool -q find-recipe %s' % pn)
217 self.assertEqual(recipepath, result.output.strip())
218 # Test devtool edit-recipe
219 result = runCmd('EDITOR="echo 123" devtool -q edit-recipe %s' % pn)
220 self.assertEqual('123 %s' % recipepath, result.output.strip())
212 # Clean up anything in the workdir/sysroot/sstate cache (have to do this *after* devtool add since the recipe only exists then) 221 # Clean up anything in the workdir/sysroot/sstate cache (have to do this *after* devtool add since the recipe only exists then)
213 bitbake('pv -c cleansstate') 222 bitbake('%s -c cleansstate' % pn)
214 # Test devtool build 223 # Test devtool build
215 result = runCmd('devtool build pv') 224 result = runCmd('devtool build %s' % pn)
216 bb_vars = get_bb_vars(['D', 'bindir'], 'pv') 225 bb_vars = get_bb_vars(['D', 'bindir'], pn)
217 installdir = bb_vars['D'] 226 installdir = bb_vars['D']
218 self.assertTrue(installdir, 'Could not query installdir variable') 227 self.assertTrue(installdir, 'Could not query installdir variable')
219 bindir = bb_vars['bindir'] 228 bindir = bb_vars['bindir']