tests: test_urls: require explicit distro= value

Most tests have a distro= value specified already. Make distro=none
required for those tests since they are limited
This commit is contained in:
Cole Robinson 2019-03-02 16:52:24 -05:00
parent ad53d59038
commit be15a01bb2
2 changed files with 9 additions and 2 deletions

View File

@ -44,6 +44,7 @@ kernelarg = inst.repo
# Final centos5 trees, no distro detection since libosinfo doesn't track it
[centos-5.11]
url = http://vault.centos.org/5.11/os/x86_64
distro = none
# Latest centos 6 w/ i686
[centos-6-latest]
@ -187,6 +188,8 @@ distro = ubuntu17.10
# Latest release
[mageia6]
url = http://distro.ibiblio.org/mageia/distrib/6/x86_64/
distro = none
# Devel tree
[mageiacauldron]
url = http://distro.ibiblio.org/mageia/distrib/cauldron/x86_64/
distro = none

View File

@ -186,8 +186,12 @@ def _make_tests():
urls = {}
for name in cfg.sections():
vals = dict(cfg.items(name))
d = _URLTestData(name, vals["url"],
vals.get("distro", None),
url = vals["url"]
if "distro" not in vals:
print("url needs an explicit distro= value: %s" % url)
sys.exit(1)
d = _URLTestData(name, url, vals["distro"],
vals.get("testxen", "0") == "1",
vals.get("testshortcircuit", "0") == "1",
vals.get("kernelarg", None),