]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Do not run multiple tests (for distros) on baremetal.
authorSandon Van Ness <sandon@inktank.com>
Thu, 22 Aug 2013 21:48:02 +0000 (14:48 -0700)
committerSandon Van Ness <sandon@inktank.com>
Fri, 23 Aug 2013 02:36:46 +0000 (19:36 -0700)
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 <sandon@inktank.com>
teuthology/suite.py

index de24261ccfe5e5806a750c10eb4d2934618fd60c..9825dcf1816c55c18129dbf13a993aa6bee0bd90 100644 (file)
@@ -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
+