mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 21:49:33 +02:00
mdadm: fetch from git
Upstream has released a new version (4.4) but not the tarball for it. Adjust one of the devtool selftests, as it requires that the recipe under test is using a tarball. Another selftest also needs to be tweaked to correctly clean up its modifications to that same recipe on test completion. (From OE-Core rev: de635a9bc0392689ff36b50e7f91572d3fbaac09) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
a782647c2a
commit
e08ca20695
@@ -1185,13 +1185,16 @@ class DevtoolUpdateTests(DevtoolBase):
|
|||||||
result = runCmd('echo "A new file" > devtool-new-file', cwd=tempdir)
|
result = runCmd('echo "A new file" > devtool-new-file', cwd=tempdir)
|
||||||
result = runCmd('git add devtool-new-file', cwd=tempdir)
|
result = runCmd('git add devtool-new-file', cwd=tempdir)
|
||||||
result = runCmd('git commit -m "Add a new file"', cwd=tempdir)
|
result = runCmd('git commit -m "Add a new file"', cwd=tempdir)
|
||||||
self.add_command_to_tearDown('cd %s; rm %s/*.patch; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)))
|
cleanup_cmd = 'cd %s; rm %s/*.patch; git add %s; git checkout %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile))
|
||||||
|
self.add_command_to_tearDown(cleanup_cmd)
|
||||||
result = runCmd('devtool update-recipe %s' % testrecipe)
|
result = runCmd('devtool update-recipe %s' % testrecipe)
|
||||||
result = runCmd('git add minicom', cwd=os.path.dirname(recipefile))
|
result = runCmd('git add minicom', cwd=os.path.dirname(recipefile))
|
||||||
expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
|
expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
|
||||||
('A ', '.*/0001-Change-the-README.patch$'),
|
('A ', '.*/0001-Change-the-README.patch$'),
|
||||||
('A ', '.*/0002-Add-a-new-file.patch$')]
|
('A ', '.*/0002-Add-a-new-file.patch$')]
|
||||||
self._check_repo_status(os.path.dirname(recipefile), expected_status)
|
self._check_repo_status(os.path.dirname(recipefile), expected_status)
|
||||||
|
result = runCmd(cleanup_cmd)
|
||||||
|
self._check_repo_status(os.path.dirname(recipefile), [])
|
||||||
|
|
||||||
def test_devtool_update_recipe_git(self):
|
def test_devtool_update_recipe_git(self):
|
||||||
# Check preconditions
|
# Check preconditions
|
||||||
@@ -1248,7 +1251,7 @@ class DevtoolUpdateTests(DevtoolBase):
|
|||||||
|
|
||||||
def test_devtool_update_recipe_append(self):
|
def test_devtool_update_recipe_append(self):
|
||||||
# Check preconditions
|
# Check preconditions
|
||||||
testrecipe = 'mdadm'
|
testrecipe = 'minicom'
|
||||||
bb_vars = get_bb_vars(['FILE', 'SRC_URI'], testrecipe)
|
bb_vars = get_bb_vars(['FILE', 'SRC_URI'], testrecipe)
|
||||||
recipefile = bb_vars['FILE']
|
recipefile = bb_vars['FILE']
|
||||||
src_uri = bb_vars['SRC_URI']
|
src_uri = bb_vars['SRC_URI']
|
||||||
@@ -1266,7 +1269,7 @@ class DevtoolUpdateTests(DevtoolBase):
|
|||||||
# Check git repo
|
# Check git repo
|
||||||
self._check_src_repo(tempsrcdir)
|
self._check_src_repo(tempsrcdir)
|
||||||
# Add a commit
|
# Add a commit
|
||||||
result = runCmd("sed 's!\\(#define VERSION\\W*\"[^\"]*\\)\"!\\1-custom\"!' -i ReadMe.c", cwd=tempsrcdir)
|
result = runCmd('echo "Additional line" >> README', cwd=tempsrcdir)
|
||||||
result = runCmd('git commit -a -m "Add our custom version"', cwd=tempsrcdir)
|
result = runCmd('git commit -a -m "Add our custom version"', cwd=tempsrcdir)
|
||||||
self.add_command_to_tearDown('cd %s; rm -f %s/*.patch; git checkout .' % (os.path.dirname(recipefile), testrecipe))
|
self.add_command_to_tearDown('cd %s; rm -f %s/*.patch; git checkout .' % (os.path.dirname(recipefile), testrecipe))
|
||||||
# Create a temporary layer and add it to bblayers.conf
|
# Create a temporary layer and add it to bblayers.conf
|
||||||
@@ -1305,7 +1308,7 @@ class DevtoolUpdateTests(DevtoolBase):
|
|||||||
self.assertEqual(expectedlines2, f.readlines())
|
self.assertEqual(expectedlines2, f.readlines())
|
||||||
# Put commit back and check we can run it if layer isn't in bblayers.conf
|
# Put commit back and check we can run it if layer isn't in bblayers.conf
|
||||||
os.remove(bbappendfile)
|
os.remove(bbappendfile)
|
||||||
result = runCmd("sed 's!\\(#define VERSION\\W*\"[^\"]*\\)\"!\\1-custom\"!' -i ReadMe.c", cwd=tempsrcdir)
|
result = runCmd('echo "Additional line" >> README', cwd=tempsrcdir)
|
||||||
result = runCmd('git commit -a -m "Add our custom version"', cwd=tempsrcdir)
|
result = runCmd('git commit -a -m "Add our custom version"', cwd=tempsrcdir)
|
||||||
result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir)
|
result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir)
|
||||||
result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
|
result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
|||||||
file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
|
file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
|
||||||
|
|
||||||
|
|
||||||
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
|
SRC_URI = "git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git;protocol=https;branch=main;tag=mdadm-${PV} \
|
||||||
file://run-ptest \
|
file://run-ptest \
|
||||||
file://mdadm-3.3.2_x32_abi_time_t.patch \
|
file://mdadm-3.3.2_x32_abi_time_t.patch \
|
||||||
file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \
|
file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \
|
||||||
@@ -26,7 +26,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
|
|||||||
file://0001-include-libgen.h-for-basename-API.patch \
|
file://0001-include-libgen.h-for-basename-API.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[sha256sum] = "416727ae1f1080ea6e3090cea36dd076826fc369151e36ab736557ba92196f9f"
|
SRCREV = "d709d4161d1dd51a976147e8372fbd99ff8183bd"
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
inherit ptest systemd
|
inherit ptest systemd
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user