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.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index ddf46547de..0985434238 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -693,7 +693,44 @@ class DevtoolModifyTests(DevtoolBase):
693 693
694 self.assertTrue(bbclassextended, 'None of these recipes are BBCLASSEXTENDed to native - need to adjust testrecipes list: %s' % ', '.join(testrecipes)) 694 self.assertTrue(bbclassextended, 'None of these recipes are BBCLASSEXTENDed to native - need to adjust testrecipes list: %s' % ', '.join(testrecipes))
695 self.assertTrue(inheritnative, 'None of these recipes do "inherit native" - need to adjust testrecipes list: %s' % ', '.join(testrecipes)) 695 self.assertTrue(inheritnative, 'None of these recipes do "inherit native" - need to adjust testrecipes list: %s' % ', '.join(testrecipes))
696 def test_devtool_modify_localfiles_only(self):
697 # Check preconditions
698 testrecipe = 'base-files'
699 src_uri = (get_bb_var('SRC_URI', testrecipe) or '').split()
700 foundlocalonly = False
701 correct_symlink = False
702 for item in src_uri:
703 if item.startswith('file://'):
704 if '.patch' not in item:
705 foundlocalonly = True
706 else:
707 foundlocalonly = False
708 break
709 self.assertTrue(foundlocalonly, 'This test expects the %s recipe to fetch local files only and it seems that it no longer does' % testrecipe)
710 # Clean up anything in the workdir/sysroot/sstate cache
711 bitbake('%s -c cleansstate' % testrecipe)
712 # Try modifying a recipe
713 tempdir = tempfile.mkdtemp(prefix='devtoolqa')
714 self.track_for_cleanup(tempdir)
715 self.track_for_cleanup(self.workspacedir)
716 self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
717 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
718 result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
719 srcfile = os.path.join(tempdir, 'oe-local-files/share/dot.bashrc')
720 srclink = os.path.join(tempdir, 'share/dot.bashrc')
721 self.assertExists(srcfile, 'Extracted source could not be found')
722 if os.path.islink(srclink) and os.path.exists(srclink) and os.path.samefile(srcfile, srclink):
723 correct_symlink = True
724 self.assertTrue(correct_symlink, 'Source symlink to oe-local-files is broken')
696 725
726 matches = glob.glob(os.path.join(self.workspacedir, 'appends', '%s_*.bbappend' % testrecipe))
727 self.assertTrue(matches, 'bbappend not created')
728 # Test devtool status
729 result = runCmd('devtool status')
730 self.assertIn(testrecipe, result.output)
731 self.assertIn(tempdir, result.output)
732 # Try building
733 bitbake(testrecipe)
697 734
698 def test_devtool_modify_git(self): 735 def test_devtool_modify_git(self):
699 # Check preconditions 736 # Check preconditions