From: Sandon Van Ness Date: Thu, 22 Aug 2013 21:48:02 +0000 (-0700) Subject: Do not run multiple tests (for distros) on baremetal. X-Git-Tag: 1.1.0~1947 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dad8d1aa3adf44e4f734cc51faa86d217b7a5e0c;p=teuthology.git Do not run multiple tests (for distros) on baremetal. Teuthology doesnt care about os_type for baremetal (ATM). This change makes it so you can run tests that have been switched over to run on multiple distros (on vms) on baremetal as well as all non-ubuntu tests will be skiped (to avoid running the same test multiple times on baremetal. Signed-off-by: Sandon Van Ness --- diff --git a/teuthology/suite.py b/teuthology/suite.py index de24261cc..9825dcf18 100644 --- a/teuthology/suite.py +++ b/teuthology/suite.py @@ -133,6 +133,7 @@ combination, and will override anything in the suite. ) arch = get_arch(args.config) + machine_type = get_machine_type(args.config) for configs in itertools.product(*facet_configs): description = 'collection:%s ' % (collection_name); description += ' '.join('{facet}:{name}'.format( @@ -153,6 +154,14 @@ combination, and will override anything in the suite. 'Skipping due to excluded_os_type: %s facets %s', exclude_os_type, description ) continue + # We should not run multiple tests (changing distros) unless the machine is a VPS + # Re-imaging baremetal is not yet supported. + if machine_type != 'vps': + if os_type != 'ubuntu': + log.info( + 'Skipping due to non-ubuntu on baremetal facets %s', description + ) + continue log.info( 'Running teuthology-schedule with facets %s', description @@ -463,3 +472,11 @@ def get_exclude_os_type(configs): return os_type return None +def get_machine_type(config): + for yamlfile in config: + y = yaml.safe_load(file(yamlfile)) + machine_type = y.get('machine_type') + if machine_type: + return machine_type + return None +