All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH 1/2 v2] patchtest: skip merge test if not targeting master
@ 2023-10-19 21:03 Trevor Gamblin
  0 siblings, 0 replies; only message in thread
From: Trevor Gamblin @ 2023-10-19 21:03 UTC (permalink / raw)
  To: openembedded-core

Avoid testing mergeability of a patch when not targeting master, so that
patches tested via other means (e.g. maintainer branches and AB runs)
don't get unnecessarily reviewed an extra time.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
v2 corrects the logic in the new if statement (modified during a test)
and states which branch was detected as a patch target when printing the
message. It also adds a detailed commit message so that it'll pass the
patchtest check.

 meta/lib/patchtest/tests/test_mbox_merge.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/patchtest/tests/test_mbox_merge.py b/meta/lib/patchtest/tests/test_mbox_merge.py
index bc55c588b40..f69d57c71b1 100644
--- a/meta/lib/patchtest/tests/test_mbox_merge.py
+++ b/meta/lib/patchtest/tests/test_mbox_merge.py
@@ -18,6 +18,8 @@ def headlog():
 
 class Merge(base.Base):
     def test_series_merge_on_head(self):
+        if PatchTestInput.repo.branch != "master":
+            self.skip("Skipping merge test since patch is not intended for master branch. Target detected is %s" % PatchTestInput.repo.branch)
         if not PatchTestInput.repo.ismerged:
             commithash, author, date, shortlog = headlog()
             self.fail('Series does not apply on top of target branch. Rebase your series and ensure the target is correct',
-- 
2.41.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-19 21:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-19 21:03 [OE-core][PATCH 1/2 v2] patchtest: skip merge test if not targeting master Trevor Gamblin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.