mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 12:32:15 +02:00
oeqa/selftest/devtool: add test for recipes with multiple sources in SRC_URI
add a non regression test for devtool modify/build on recipe having several sources in SRC_URI (From OE-Core rev: 5f195f5e98d5553e41e632eda26392ee70394c88) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
facab170b6
commit
bf9ac22f41
@@ -1086,6 +1086,32 @@ class DevtoolModifyTests(DevtoolBase):
|
||||
check('devtool-override-qemuarm', 'This is a test for qemuarm\n')
|
||||
check('devtool-override-qemux86', 'This is a test for qemux86\n')
|
||||
|
||||
def test_devtool_modify_multiple_sources(self):
|
||||
# This test check that recipes fetching several sources can be used with devtool modify/build
|
||||
# Check preconditions
|
||||
testrecipe = 'bzip2'
|
||||
src_uri = get_bb_var('SRC_URI', testrecipe)
|
||||
src1 = 'https://' in src_uri
|
||||
src2 = 'git://' in src_uri
|
||||
self.assertTrue(src1 and src2, 'This test expects the %s recipe to fetch both a git source and a tarball and it seems that it no longer does' % testrecipe)
|
||||
# Clean up anything in the workdir/sysroot/sstate cache
|
||||
bitbake('%s -c cleansstate' % testrecipe)
|
||||
# Try modifying a recipe
|
||||
tempdir = tempfile.mkdtemp(prefix='devtoolqa')
|
||||
self.track_for_cleanup(tempdir)
|
||||
self.track_for_cleanup(self.workspacedir)
|
||||
self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
|
||||
self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
|
||||
result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
|
||||
self.assertEqual(result.status, 0, "Could not modify recipe %s. Output: %s" % (testrecipe, result.output))
|
||||
# Test devtool status
|
||||
result = runCmd('devtool status')
|
||||
self.assertIn(testrecipe, result.output)
|
||||
self.assertIn(tempdir, result.output)
|
||||
# Try building
|
||||
result = bitbake(testrecipe)
|
||||
self.assertEqual(result.status, 0, "Bitbake failed, exit code %s, output %s" % (result.status, result.output))
|
||||
|
||||
class DevtoolUpdateTests(DevtoolBase):
|
||||
|
||||
def test_devtool_update_recipe(self):
|
||||
|
||||
Reference in New Issue
Block a user