@@ -67,13 +67,10 @@ class TestPatch(base.Base):
if not header_has_upstream:
if body_has_upstream:
- self.fail(
- 'Upstream-Status is present only after the patch scissors. '
- "It must be placed in the patch header before the scissors line.",
- data=[
- ("Standard format", self.standard_format),
- ("Valid status", self.valid_status),
- ],
+ print(
+ "WARNING: Upstream-Status is present only after the patch scissors. "
+ "It may be ignored by git and lost during patch refresh. "
+ "Consider placing it before the scissors line."
)
else:
self.fail(
@@ -92,15 +89,12 @@ class TestPatch(base.Base):
continue
if scissors_index is not None and idx > scissors_index:
- self.fail(
- 'Upstream-Status must be placed in the patch header before the scissors line, '
- "but was found afterwards.",
- data=[
- ("Current", line.lstrip("+")),
- ("Standard format", self.standard_format),
- ("Valid status", self.valid_status),
- ],
+ print(
+ "WARNING: Upstream-Status found after patch scissors. "
+ "It may be ignored by git and lost during patch refresh. "
+ "Consider placing it before the scissors line."
)
+ continue
if patchtest_patterns.inappropriate.searchString(line):
try:
[YOCTO #15940] Detect cases where Upstream-Status is placed after the patch scissors ("---") and emit a warning instead of failing. Such placement may be intentional in some workflows to avoid including the tag in upstream commits. v3: - Fix indentation issues from previous version - Keep changes minimal and avoid unrelated formatting changes - Retain intended warning behavior Signed-off-by: Aditya GS <adityags2004@gmail.com> --- meta/lib/patchtest/tests/test_patch.py | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-)