mirror of
git://git.yoctoproject.org/poky
synced 2026-04-02 02:49:11 +00:00
oeqa/selftest/cases/package.py: adding unittest for package rename conflicts
This Unittest tries to rename a package, using an already used name and fails on do_package. Reviewed-by: Yoann CONGAL <yoann.congal@smile.fr> (From OE-Core rev: efcb5c2b6009632c1ca1c7b401944ccf9fe2eb44) Signed-off-by: Fawzi KHABER <fawzi.khaber@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c3fe173d5196506d89aa464ba56aabcf581a60db) Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
parent
684dfc79ff
commit
78fe6339e8
@ -0,0 +1,10 @@
|
|||||||
|
SUMMARY = "Test case that tries to rename a package to an existing one and fails"
|
||||||
|
DESCRIPTION = "This generates a packaging error when a package is renamed to a pre-existing name"
|
||||||
|
LICENSE = "MIT"
|
||||||
|
|
||||||
|
# Add a new package ${PN}-renametest
|
||||||
|
PACKAGES += "${PN}-renametest"
|
||||||
|
# ... and try to rename the ${PN}-dev to the new ${PN}-renametest (conflict)
|
||||||
|
PKG:${PN}-dev = "${PN}-renametest"
|
||||||
|
|
||||||
|
EXCLUDE_FROM_WORLD = "1"
|
||||||
@ -89,6 +89,13 @@ class VersionOrdering(OESelftestTestCase):
|
|||||||
self.assertEqual(status - 100, sort, "%s %s (%d) failed" % (ver1, ver2, sort))
|
self.assertEqual(status - 100, sort, "%s %s (%d) failed" % (ver1, ver2, sort))
|
||||||
|
|
||||||
class PackageTests(OESelftestTestCase):
|
class PackageTests(OESelftestTestCase):
|
||||||
|
# Verify that a recipe cannot rename a package into an existing one
|
||||||
|
def test_package_name_conflict(self):
|
||||||
|
res = bitbake("packagenameconflict", ignore_status=True)
|
||||||
|
self.assertNotEqual(res.status, 0)
|
||||||
|
err = "package name already exists"
|
||||||
|
self.assertTrue(err in res.output)
|
||||||
|
|
||||||
# Verify that a recipe which sets up hardlink files has those preserved into split packages
|
# Verify that a recipe which sets up hardlink files has those preserved into split packages
|
||||||
# Also test file sparseness is preserved
|
# Also test file sparseness is preserved
|
||||||
def test_preserve_sparse_hardlinks(self):
|
def test_preserve_sparse_hardlinks(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user