]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
patchtest: test_non_auh_upgrade: improve parse logic
authorTrevor Gamblin <tgamblin@baylibre.com>
Sun, 1 Sep 2024 00:51:19 +0000 (20:51 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 1 Sep 2024 11:32:35 +0000 (12:32 +0100)
The AUH email address used for matching was outdated. Fix it so that it
correctly identifies emails using the new one.

Also make sure to only scan the commit message and not the body, since
it's possible (like in this patch) that the user may be editing actual
code that checks for AUH-related strings.

Fixes [YOCTO #15390].

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/patchtest/tests/test_mbox.py

index 0e3d055780a6329742e800db2f046917acdb0808..cd76e58a7170ece59c1cf78ff4f018e96a81e7da 100644 (file)
@@ -23,7 +23,7 @@ def headlog():
 
 class TestMbox(base.Base):
 
-    auh_email = 'auh@auh.yoctoproject.org'
+    auh_email = 'auh@yoctoproject.org'
 
     invalids = [pyparsing.Regex("^Upgrade Helper.+"),
                 pyparsing.Regex(auh_email),
@@ -155,5 +155,5 @@ class TestMbox(base.Base):
 
     def test_non_auh_upgrade(self):
         for commit in self.commits:
-            if self.auh_email in commit.payload:
+            if self.auh_email in commit.commit_message:
                 self.fail('Invalid author %s. Resend the series with a valid patch author' % self.auh_email, commit=commit)