diff options
Diffstat (limited to 'scripts/contrib/patchreview.py')
-rwxr-xr-x | scripts/contrib/patchreview.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py index bceae06561..d8d7b214e5 100755 --- a/scripts/contrib/patchreview.py +++ b/scripts/contrib/patchreview.py | |||
@@ -14,6 +14,10 @@ import pathlib | |||
14 | import re | 14 | import re |
15 | import subprocess | 15 | import subprocess |
16 | 16 | ||
17 | import sys | ||
18 | sys.path.append(os.path.join(sys.path[0], '../../meta/lib')) | ||
19 | import 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 |
@@ -47,7 +51,7 @@ def blame_patch(patch): | |||
47 | return subprocess.check_output(("git", "log", | 51 | return subprocess.check_output(("git", "log", |
48 | "--follow", "--find-renames", "--diff-filter=A", | 52 | "--follow", "--find-renames", "--diff-filter=A", |
49 | "--format=%s (%aN <%aE>)", | 53 | "--format=%s (%aN <%aE>)", |
50 | "--", patch)).decode("utf-8").splitlines() | 54 | "--", patch), cwd=os.path.dirname(patch)).decode("utf-8").splitlines() |
51 | 55 | ||
52 | def patchreview(patches): | 56 | def patchreview(patches): |
53 | 57 | ||
@@ -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() |