patchtest: skip merge test if not targeting master

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.

(From OE-Core rev: e6cf23e353f48c57249681bd0b12bd8494d4959a)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Trevor Gamblin
2023-10-19 17:03:32 -04:00
committed by Richard Purdie
parent 9b8b9a9fa3
commit 8cea0676b7

View File

@@ -18,6 +18,8 @@ def headlog():
class Merge(base.Base): class Merge(base.Base):
def test_series_merge_on_head(self): 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: if not PatchTestInput.repo.ismerged:
commithash, author, date, shortlog = headlog() 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', self.fail('Series does not apply on top of target branch. Rebase your series and ensure the target is correct',