mirror of
git://git.yoctoproject.org/yocto-autobuilder-helper.git
synced 2025-07-19 20:59:02 +02:00
scripts/test_utils.py: update test after BUILD_HISTORY_DIRECTPUSH removal
Update getcomparisonbranch unit tests by removing BUILD_HISTORY_DIRECTPUSH entry in fake configuration Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
f54329cf35
commit
d3c671d545
|
@ -7,22 +7,7 @@ import utils
|
||||||
|
|
||||||
class TestGetComparisonBranch(unittest.TestCase):
|
class TestGetComparisonBranch(unittest.TestCase):
|
||||||
TEST_CONFIG = {
|
TEST_CONFIG = {
|
||||||
"BUILD_HISTORY_DIRECTPUSH": [
|
"BUILD_HISTORY_FORKPUSH": {
|
||||||
"poky:morty",
|
|
||||||
"poky:pyro",
|
|
||||||
"poky:rocko",
|
|
||||||
"poky:sumo",
|
|
||||||
"poky:thud",
|
|
||||||
"poky:warrior",
|
|
||||||
"poky:zeus",
|
|
||||||
"poky:dunfell",
|
|
||||||
"poky:gatesgarth",
|
|
||||||
"poky:hardknott",
|
|
||||||
"poky:honister",
|
|
||||||
"poky:kirkstone",
|
|
||||||
"poky:langdale",
|
|
||||||
"poky:master"
|
|
||||||
], "BUILD_HISTORY_FORKPUSH": {
|
|
||||||
"poky-contrib:ross/mut": "poky:master",
|
"poky-contrib:ross/mut": "poky:master",
|
||||||
"poky:master-next": "poky:master",
|
"poky:master-next": "poky:master",
|
||||||
"poky-contrib:abelloni/master-next": "poky:master"
|
"poky-contrib:abelloni/master-next": "poky:master"
|
||||||
|
@ -35,9 +20,9 @@ class TestGetComparisonBranch(unittest.TestCase):
|
||||||
basebranch, comparebranch = utils.getcomparisonbranch(
|
basebranch, comparebranch = utils.getcomparisonbranch(
|
||||||
self.TEST_CONFIG, repo, branch)
|
self.TEST_CONFIG, repo, branch)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
basebranch, "master", msg="Repo/branch pair present in BUILD_HISTORY_DIRECTPUSH must return corresponding base branch")
|
basebranch, "master", msg="Release branch in poky must return corresponding base branch")
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
comparebranch, None, msg="Repo/branch pair present in BUILD_HISTORY_DIRECTPUSH must return corresponding compare branch")
|
comparebranch, None, msg="Release branch in poky must return corresponding compare branch")
|
||||||
|
|
||||||
def test_release_kirkstone(self):
|
def test_release_kirkstone(self):
|
||||||
repo = "ssh://git@push.yoctoproject.org/poky"
|
repo = "ssh://git@push.yoctoproject.org/poky"
|
||||||
|
@ -45,9 +30,9 @@ class TestGetComparisonBranch(unittest.TestCase):
|
||||||
basebranch, comparebranch = utils.getcomparisonbranch(
|
basebranch, comparebranch = utils.getcomparisonbranch(
|
||||||
self.TEST_CONFIG, repo, branch)
|
self.TEST_CONFIG, repo, branch)
|
||||||
self.assertEqual(basebranch, "kirkstone",
|
self.assertEqual(basebranch, "kirkstone",
|
||||||
msg="Repo/branch pair present in BUILD_HISTORY_DIRECTPUSH must return corresponding base branch")
|
msg="Release branch in poky must return corresponding base branch")
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
comparebranch, None, msg="Repo/branch pair present in BUILD_HISTORY_DIRECTPUSH must return corresponding compare branch")
|
comparebranch, None, msg="Release branch in poky must return corresponding compare branch")
|
||||||
|
|
||||||
def test_release_langdale(self):
|
def test_release_langdale(self):
|
||||||
repo = "ssh://git@push.yoctoproject.org/poky"
|
repo = "ssh://git@push.yoctoproject.org/poky"
|
||||||
|
@ -55,9 +40,9 @@ class TestGetComparisonBranch(unittest.TestCase):
|
||||||
basebranch, comparebranch = utils.getcomparisonbranch(
|
basebranch, comparebranch = utils.getcomparisonbranch(
|
||||||
self.TEST_CONFIG, repo, branch)
|
self.TEST_CONFIG, repo, branch)
|
||||||
self.assertEqual(basebranch, "langdale",
|
self.assertEqual(basebranch, "langdale",
|
||||||
msg="Repo/branch pair present in BUILD_HISTORY_DIRECTPUSH must return corresponding base branch")
|
msg="Release branch in poky must return corresponding base branch")
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
comparebranch, None, msg="Repo/branch pair present in BUILD_HISTORY_DIRECTPUSH must return corresponding compare branch")
|
comparebranch, None, msg="Release branch in poky must return corresponding compare branch")
|
||||||
|
|
||||||
def test_master_next(self):
|
def test_master_next(self):
|
||||||
repo = "ssh://git@push.yoctoproject.org/poky"
|
repo = "ssh://git@push.yoctoproject.org/poky"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user