summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChee Yang Lee <chee.yang.lee@intel.com>2023-02-24 12:00:56 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-24 17:05:24 +0000
commit80a2028813d3c861f3aea0d7f5e91d9cccb7d689 (patch)
tree3e7d19369e38f72c415d67ba1df87a953010b794 /scripts
parentcfe5e501998d93bed3e4d89c76732558b89e1acb (diff)
downloadpoky-80a2028813d3c861f3aea0d7f5e91d9cccb7d689.tar.gz
checklayer: check for patch file upstream status
yocto-check-layer to check all .patch file in layer for Upstream-status and list down all .patch file without Upstream-Status. set this test as expected failure for now, so this wont fail the check layer while still able to capture any patches with malformed or missing Upstream-Status in report. [YOCTO #14642] (From OE-Core rev: 237c1b66e5014123c1e5c3e78f9ab0357bcd62dc) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/checklayer/cases/common.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py
index 722d3cf638..97b16f78c8 100644
--- a/scripts/lib/checklayer/cases/common.py
+++ b/scripts/lib/checklayer/cases/common.py
@@ -72,6 +72,21 @@ class CommonCheckLayer(OECheckLayerTestCase):
72 self.tc.layer['name']) 72 self.tc.layer['name'])
73 self.fail('\n'.join(msg)) 73 self.fail('\n'.join(msg))
74 74
75 @unittest.expectedFailure
76 def test_patches_upstream_status(self):
77 import sys
78 sys.path.append(os.path.join(sys.path[0], '../../../../meta/lib/'))
79 import oe.qa
80 patches = []
81 for dirpath, dirs, files in os.walk(self.tc.layer['path']):
82 for filename in files:
83 if filename.endswith(".patch"):
84 ppath = os.path.join(dirpath, filename)
85 if oe.qa.check_upstream_status(ppath):
86 patches.append(ppath)
87 self.assertEqual(len(patches), 0 , \
88 msg="Found following patches with malformed or missing upstream status:\n%s" % '\n'.join([str(patch) for patch in patches]))
89
75 def test_signatures(self): 90 def test_signatures(self):
76 if self.tc.layer['type'] == LayerType.SOFTWARE and \ 91 if self.tc.layer['type'] == LayerType.SOFTWARE and \
77 not self.tc.test_software_layer_signatures: 92 not self.tc.test_software_layer_signatures: