]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
patchtest: Skip test for CVE_CHECK_IGNORE for older branches
authorSimone Weiß <simone.p.weiss@posteo.com>
Fri, 23 Feb 2024 21:07:40 +0000 (21:07 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 24 Feb 2024 16:10:19 +0000 (16:10 +0000)
Skip the test for checking if CVE_CHECK_IGNORE is not used.
It is deprecated now, but was not deprecated for kirkstone and dunfell.
Skip it therefore if a patch is intended for those branches.

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/patchtest/tests/test_metadata.py

index 174dfc31c6638276547210be8d696513aa1a0fd7..be609dbd0488e17b5baba07fd0e54118a3333f4e 100644 (file)
@@ -182,8 +182,10 @@ class TestMetadata(base.Metadata):
                 self.fail('%s is missing in newly added recipe' % self.metadata_summary)
 
     def test_cve_check_ignore(self):
-        if not self.modified:
-            self.skip('No modified recipes, skipping test')
+        # Skip if we neither modified a recipe or target branches are not
+        # Nanbield and newer. CVE_CHECK_IGNORE was first deprecated in Nanbield.
+        if not self.modified or PatchTestInput.repo.branch == "kirkstone" or PatchTestInput.repo.branch == "dunfell":
+            self.skip('No modified recipes or older target branch, skipping test')
         for pn in self.modified:
             # we are not interested in images
             if 'core-image' in pn: