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 <[email protected]>
---
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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189486): 
https://lists.openembedded.org/g/openembedded-core/message/189486
Mute This Topic: https://lists.openembedded.org/mt/102069183/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to