From dad8d1aa3adf44e4f734cc51faa86d217b7a5e0c Mon Sep 17 00:00:00 2001 From: Sandon Van Ness Date: Thu, 22 Aug 2013 14:48:02 -0700 Subject: [PATCH] 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 --- teuthology/suite.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/teuthology/suite.py b/teuthology/suite.py index de24261ccf..9825dcf181 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 + -- 2.39.5