summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/devtool.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index b59db15be4..947d8eecf1 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -367,6 +367,36 @@ class DevtoolTests(DevtoolBase):
367 self.assertNotEqual(result.status, 0, 'devtool modify on %s should have failed. devtool output: %s' % (testrecipe, result.output)) 367 self.assertNotEqual(result.status, 0, 'devtool modify on %s should have failed. devtool output: %s' % (testrecipe, result.output))
368 self.assertIn('ERROR: ', result.output, 'devtool modify on %s should have given an ERROR' % testrecipe) 368 self.assertIn('ERROR: ', result.output, 'devtool modify on %s should have given an ERROR' % testrecipe)
369 369
370 def test_devtool_modify_native(self):
371 # Check preconditions
372 workspacedir = os.path.join(self.builddir, 'workspace')
373 self.assertTrue(not os.path.exists(workspacedir), 'This test cannot be run with a workspace directory under the build directory')
374 # Try modifying some recipes
375 tempdir = tempfile.mkdtemp(prefix='devtoolqa')
376 self.track_for_cleanup(tempdir)
377 self.track_for_cleanup(workspacedir)
378 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
379
380 bbclassextended = False
381 inheritnative = False
382 testrecipes = 'mtools-native apt-native desktop-file-utils-native'.split()
383 for testrecipe in testrecipes:
384 checkextend = 'native' in (get_bb_var('BBCLASSEXTEND', testrecipe) or '').split()
385 if not bbclassextended:
386 bbclassextended = checkextend
387 if not inheritnative:
388 inheritnative = not checkextend
389 result = runCmd('devtool modify %s -x %s' % (testrecipe, os.path.join(tempdir, testrecipe)))
390 self.assertNotIn('ERROR: ', result.output, 'ERROR in devtool modify output: %s' % result.output)
391 result = runCmd('devtool build %s' % testrecipe)
392 self.assertNotIn('ERROR: ', result.output, 'ERROR in devtool build output: %s' % result.output)
393 result = runCmd('devtool reset %s' % testrecipe)
394 self.assertNotIn('ERROR: ', result.output, 'ERROR in devtool reset output: %s' % result.output)
395
396 self.assertTrue(bbclassextended, 'None of these recipes are BBCLASSEXTENDed to native - need to adjust testrecipes list: %s' % ', '.join(testrecipes))
397 self.assertTrue(inheritnative, 'None of these recipes do "inherit native" - need to adjust testrecipes list: %s' % ', '.join(testrecipes))
398
399
370 @testcase(1165) 400 @testcase(1165)
371 def test_devtool_modify_git(self): 401 def test_devtool_modify_git(self):
372 # Check preconditions 402 # Check preconditions