Merge "Add Amazon Linux support to bindep"

This commit is contained in:
Jenkins 2017-04-21 12:02:47 +00:00 committed by Gerrit Code Review
commit c47e81959e
2 changed files with 8 additions and 2 deletions

View File

@ -243,8 +243,8 @@ class Depends(object):
if distro in ["debian", "ubuntu"]:
atoms.add("dpkg")
self.platform = Dpkg()
elif distro in ["centos", "redhatenterpriseserver", "fedora",
"opensuseproject", "opensusetumbleweed",
elif distro in ["amazonami", "centos", "redhatenterpriseserver",
"fedora", "opensuseproject", "opensusetumbleweed",
"suselinux"]:
if distro == "redhatenterpriseserver":
# just short alias

View File

@ -62,6 +62,12 @@ class TestDepends(TestCase):
mock_checkoutput.assert_called_once_with(["lsb_release", "-cirs"],
stderr=subprocess.STDOUT)
def test_detects_amazon_linux(self):
with self._mock_lsb("AmazonAMI"):
depends = Depends("")
self.assertThat(
depends.platform_profiles(), Contains("platform:amazonami"))
def test_detects_centos(self):
with self._mock_lsb("CentOS"):
depends = Depends("")