mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
selftest: always tweak ERROR_QA/WARN_QA per package
Globally changing it completely destroys sstate reuse, as seen for example here: https://autobuilder.yoctoproject.org/typhoon/#/builders/127/builds/3763/steps/14/logs/stdio (From OE-Core rev: 9c75c11f4f6816cfc56eb85a43859a228a5d2950) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
5fa9296447
commit
46d4072a97
@@ -84,7 +84,7 @@ class SanityOptionsTest(OESelftestTestCase):
|
||||
|
||||
self.write_config("INHERIT:remove = \"report-error\"")
|
||||
if "packages-list" not in get_bb_var("ERROR_QA"):
|
||||
self.append_config("ERROR_QA:append = \" packages-list\"")
|
||||
self.append_config("ERROR_QA:append:pn-xcursor-transparent-theme = \" packages-list\"")
|
||||
|
||||
self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
|
||||
self.add_command_to_tearDown('bitbake -c clean xcursor-transparent-theme')
|
||||
@@ -94,8 +94,8 @@ class SanityOptionsTest(OESelftestTestCase):
|
||||
self.assertTrue(line and line.startswith("ERROR:"), msg=res.output)
|
||||
self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
|
||||
self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
|
||||
self.append_config('ERROR_QA:remove = "packages-list"')
|
||||
self.append_config('WARN_QA:append = " packages-list"')
|
||||
self.append_config('ERROR_QA:remove:pn-xcursor-transparent-theme = "packages-list"')
|
||||
self.append_config('WARN_QA:append:pn-xcursor-transparent-theme = " packages-list"')
|
||||
res = bitbake("xcursor-transparent-theme -f -c package")
|
||||
self.delete_recipeinc('xcursor-transparent-theme')
|
||||
line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
|
||||
|
||||
@@ -114,7 +114,7 @@ INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0* LGPL-3.0*"
|
||||
|
||||
def test_bash_and_license(self):
|
||||
self.disable_class("create-spdx")
|
||||
self.write_config(self.default_config() + '\nLICENSE:append:pn-bash = " & SomeLicense"\nERROR_QA:remove = "license-exists"')
|
||||
self.write_config(self.default_config() + '\nLICENSE:append:pn-bash = " & SomeLicense"\nERROR_QA:remove:pn-bash = "license-exists"')
|
||||
error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0-or-later"
|
||||
|
||||
result = bitbake('core-image-minimal', ignore_status=True)
|
||||
@@ -123,12 +123,12 @@ INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0* LGPL-3.0*"
|
||||
|
||||
def test_bash_or_license(self):
|
||||
self.disable_class("create-spdx")
|
||||
self.write_config(self.default_config() + '\nLICENSE:append:pn-bash = " | SomeLicense"\nERROR_QA:remove = "license-exists license-file-missing"')
|
||||
self.write_config(self.default_config() + '\nLICENSE:append:pn-bash = " | SomeLicense"\nERROR_QA:remove:pn-bash = "license-exists"\nERROR_QA:remove:pn-core-image-minimal = "license-file-missing"')
|
||||
|
||||
bitbake('core-image-minimal')
|
||||
|
||||
def test_bash_license_exceptions(self):
|
||||
self.write_config(self.default_config() + '\nINCOMPATIBLE_LICENSE_EXCEPTIONS:pn-core-image-minimal = "bash:GPL-3.0-or-later"\nERROR_QA:remove = "license-exception"')
|
||||
self.write_config(self.default_config() + '\nINCOMPATIBLE_LICENSE_EXCEPTIONS:pn-core-image-minimal = "bash:GPL-3.0-or-later"\nERROR_QA:remove:pn-core-image-minimal = "license-exception"')
|
||||
|
||||
bitbake('core-image-minimal')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user