summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 51949e3c93..cc4cbec5ae 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -749,6 +749,25 @@ class DevtoolModifyTests(DevtoolBase):
749 result = runCmd('devtool status') 749 result = runCmd('devtool status')
750 self.assertNotIn('mdadm', result.output) 750 self.assertNotIn('mdadm', result.output)
751 751
752 def test_devtool_modify_go(self):
753 import oe.path
754 from tempfile import TemporaryDirectory
755 with TemporaryDirectory(prefix='devtoolqa') as tempdir:
756 self.track_for_cleanup(self.workspacedir)
757 self.add_command_to_tearDown('bitbake -c clean go-helloworld')
758 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
759 result = runCmd('devtool modify go-helloworld -x %s' % tempdir)
760 self.assertExists(
761 oe.path.join(tempdir, 'src', 'golang.org', 'x', 'example', 'go.mod'),
762 'Extracted source could not be found'
763 )
764 self.assertExists(
765 oe.path.join(self.workspacedir, 'conf', 'layer.conf'),
766 'Workspace directory not created'
767 )
768 matches = glob.glob(oe.path.join(self.workspacedir, 'appends', 'go-helloworld_*.bbappend'))
769 self.assertTrue(matches, 'bbappend not created %s' % result.output)
770
752 def test_devtool_buildclean(self): 771 def test_devtool_buildclean(self):
753 def assertFile(path, *paths): 772 def assertFile(path, *paths):
754 f = os.path.join(path, *paths) 773 f = os.path.join(path, *paths)