From: Dan Mick Date: Tue, 19 Jul 2016 05:42:39 +0000 (-0700) Subject: suite: Allow distroversion to contain either codename or version X-Git-Tag: 1.1.0~563^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=82cbfdde86594aae1eb5cc376a7e6df62ec27702;p=teuthology.git suite: Allow distroversion to contain either codename or version Signed-off-by: Dan Mick --- diff --git a/teuthology/packaging.py b/teuthology/packaging.py index defbec31a..a3aaba91b 100644 --- a/teuthology/packaging.py +++ b/teuthology/packaging.py @@ -473,6 +473,10 @@ class GitbuilderProject(object): self.flavor = self.job_config.get("flavor") self.codename = self.job_config.get("codename") self.os_version = self._get_version() + # if os_version is given, prefer version/codename derived from it + if self.os_version: + self.os_version, self.codename = \ + OS.version_codename(self.os_type, self.os_version) self.branch = self.job_config.get("branch") self.tag = self.job_config.get("tag") self.ref = self.job_config.get("ref") diff --git a/teuthology/suite/run.py b/teuthology/suite/run.py index 4c9b1a750..fd43eccc1 100644 --- a/teuthology/suite/run.py +++ b/teuthology/suite/run.py @@ -13,6 +13,7 @@ from ..exceptions import ( BranchNotFoundError, CommitNotFoundError, VersionNotFoundError ) from ..misc import deep_merge, get_results_url +from ..orchestra.opsys import OS from . import util from .build_matrix import combine_path, build_matrix @@ -86,6 +87,9 @@ class Run(object): suite_branch = self.choose_suite_branch() suite_hash = self.choose_suite_hash(suite_branch) + if self.args.distro_version: + self.args.distro_version, _ = \ + OS.version_codename(self.args.distro, self.args.distro_version) self.config_input = dict( suite=self.args.suite, suite_branch=suite_branch, diff --git a/teuthology/suite/util.py b/teuthology/suite/util.py index 106f8bff6..896dd4525 100644 --- a/teuthology/suite/util.py +++ b/teuthology/suite/util.py @@ -375,7 +375,6 @@ def get_package_versions(sha1, os_type, os_version, flavor, os_types = package_versions.get(sha1, dict()) os_versions = os_types.get(os_type, dict()) - # XXX alternate ways of specifying version? flavors = os_versions.get(os_version, dict()) if flavor not in flavors: package_version = package_version_for_hash(