summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2024-11-06 15:54:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-11-12 11:19:44 +0000
commit6eb0a35580ab935432c3f9eaf8afca91496f4f53 (patch)
tree5f23d5a9118ed296ead3967567354dbb178dc20b /scripts
parent242e47dd0940d74cdc3e2d611612dbf268f9dd63 (diff)
downloadpoky-6eb0a35580ab935432c3f9eaf8afca91496f4f53.tar.gz
patchreview: use check_upstream_status() from oe.qa
* the idea was to reuse the same function as I've noticed that the QA check which was added to insane.bbclass in: https://git.openembedded.org/openembedded-core/commit/?id=76a685bfcf927593eac67157762a53259089ea8a is in some cases more strcit than scripts/contrib/patchreview.py To be honest I wasn't aware of scripts/contrib/patchreview.py existence when I've asked about moving check_upstream_status() to oe.qa in order to write standalone script just like patchreview.py * I've sent this long time ago: https://lists.openembedded.org/g/openembedded-core/message/177207 but didn't like the sys.path.append to find oe.qa much or the duplicated path to .patch file in the output, then I've forgot about it until today in https://github.com/OE4T/meta-tegra/pull/1749 where checklayer found one more issue, which I haven't noticed with patchreview.py before (because I've accidentally used a version without this change). It's not perfect, but at least it will be consistent with checklayer and patch-status QA check. (From OE-Core rev: f291c08ea6a95638c3ad1f70434678bd5e374195) Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/contrib/patchreview.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py
index bceae06561..69ef14eb44 100755
--- a/scripts/contrib/patchreview.py
+++ b/scripts/contrib/patchreview.py
@@ -14,6 +14,10 @@ import pathlib
14import re 14import re
15import subprocess 15import subprocess
16 16
17import sys
18sys.path.append(os.path.join(sys.path[0], '../../meta/lib'))
19import oe.qa
20
17# TODO 21# TODO
18# - option to just list all broken files 22# - option to just list all broken files
19# - test suite 23# - test suite
@@ -78,12 +82,11 @@ def patchreview(patches):
78 else: 82 else:
79 result.missing_sob = True 83 result.missing_sob = True
80 84
81
82 # Find the Upstream-Status tag 85 # Find the Upstream-Status tag
83 match = status_re.search(content) 86 match = status_re.search(content)
84 if match: 87 if match:
85 value = match.group(1) 88 value = oe.qa.check_upstream_status(patch)
86 if value != "Upstream-Status:": 89 if value:
87 result.malformed_upstream_status = value 90 result.malformed_upstream_status = value
88 91
89 value = match.group(2).lower() 92 value = match.group(2).lower()