]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
patchtest: detect leftover AUH changelog-truncation notice
authorDaniel Turull <daniel.turull@ericsson.com>
Fri, 31 Jul 2026 13:27:14 +0000 (15:27 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 3 Aug 2026 16:20:17 +0000 (17:20 +0100)
Add a check for the changelog-truncation notice that auto-upgrade-helper
appends to the commit message when the devtool changelog exceeds
changelog_max_len. This text is meant to be replaced by the submitter
with their own summary of the changes before sending the patch, so flag
it if left in place.

AI-Generated: Kiro with Claude Sonnet 5
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/patchtest/patchtest_patterns.py
meta/lib/patchtest/selftest/files/TestMbox.test_auh_changelog_truncation_notice.fail [new file with mode: 0644]
meta/lib/patchtest/selftest/files/TestMbox.test_auh_changelog_truncation_notice.pass [new symlink]
meta/lib/patchtest/tests/test_mbox.py

index 1a8db92aa5372c481164604c0dee2c2367c9fd87..11e5996df025385b2d9404b15a2c8cb1f9c980cd 100644 (file)
@@ -48,6 +48,7 @@ patchmetadata_regex = re.compile(
 
 # mbox
 auh_email = 'auh@yoctoproject.org'
+auh_changelog_truncated = 'the full changelog can be found in an attachment to the AUH email'
 
 invalid_submitters = [pyparsing.Regex("^Upgrade Helper.+"),
             pyparsing.Regex(auh_email),
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_auh_changelog_truncation_notice.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_auh_changelog_truncation_notice.fail
new file mode 100644 (file)
index 0000000..7fe3c77
--- /dev/null
@@ -0,0 +1,25 @@
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1
+
+[Changelog truncated as it exceeds 3000 characters;
+the full changelog can be found in an attachment to the AUH email]
+
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
+---
+ meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+index 2dc352d479e..b6be3f2e1e0 100644
+--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -1,4 +1,4 @@
+-SUMMARY = "This is an example summary"
++SUMMARY = "This is an example summary, slightly updated"
+ DESCRIPTION = "Simple helloworld application -- selftest variant"
+ SECTION = "examples"
+ LICENSE = "MIT"
+-- 
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_auh_changelog_truncation_notice.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_auh_changelog_truncation_notice.pass
new file mode 120000 (symlink)
index 0000000..afeb3e7
--- /dev/null
@@ -0,0 +1 @@
+TestMbox.test_commit_message_presence.pass
\ No newline at end of file
index feb87fa2aeb76525f495f5d3697a3d208e9b1f0e..3db21d210414988b7029014ec49e75f3dee4c1d3 100644 (file)
@@ -177,3 +177,12 @@ class TestMbox(base.Base):
                     % patchtest_patterns.auh_email,
                     commit=commit,
                 )
+
+    def test_auh_changelog_truncation_notice(self):
+        for commit in self.commits:
+            if patchtest_patterns.auh_changelog_truncated in commit.commit_message:
+                self.fail(
+                    "Commit message contains the AUH changelog-truncation notice left over from "
+                    "the auto upgrade. Remove it and summarize the relevant changes yourself",
+                    commit=commit,
+                )