]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
implement teuthology_path similar to suite_path 534/head
authorLoic Dachary <loic@dachary.org>
Tue, 16 Jun 2015 10:38:11 +0000 (10:38 +0000)
committerLoic Dachary <ldachary@redhat.com>
Sun, 19 Jul 2015 06:37:19 +0000 (08:37 +0200)
In case we want to reference a local directory instead of reseting from
a clone of teuthology.

Signed-off-by: Loic Dachary <loic@dachary.org>
docs/siteconfig.rst
teuthology/config.py
teuthology/suite.py
teuthology/worker.py

index 8a54525139c98a96a3f6777273835b8f98ff0651..d0ab2643f0876b92393a9c901e3d17719554d219 100644 (file)
@@ -57,6 +57,9 @@ Here is a sample configuration with many of the options set and documented::
     # Where teuthology and ceph-qa-suite repos should be stored locally
     src_base_path: /home/foo/src
 
+    # Where teuthology path is located: do not clone if present
+    #teuthology_path: .
+
     # Whether or not teuthology-suite, when scheduling, should update 
     # itself from git. This is disabled by default.
     automated_scheduling: false
index 9bf36f3be613f27e32c4b33a6142becbdb604548..afb740b5c3f78f3f4445a4ebd6c0e168ba5b7391 100644 (file)
@@ -144,6 +144,7 @@ class TeuthologyConfig(YamlConfig):
         'kojiroot_url': 'http://kojipkgs.fedoraproject.org/packages',
         'koji_task_url': 'https://kojipkgs.fedoraproject.org/work/',
         'baseurl_template': 'http://{host}/{proj}-{pkg_type}-{dist}-{arch}-{flavor}/{uri}',
+        'teuthology_path': None,
     }
 
     def __init__(self, yaml_path=None):
index eb784f863b4c6987ee7076cf883cd896f40c546b..91454f98c210e4c678812dc22fab17a6119d4947 100644 (file)
@@ -153,7 +153,8 @@ def fetch_repos(branch, test_name):
         # teuthology, let's not wreak havoc on it.
         if config.automated_scheduling:
             # We use teuthology's master branch in all cases right now
-            fetch_teuthology('master')
+            if config.teuthology_path is None:
+                fetch_teuthology('master')
         suite_repo_path = fetch_qa_suite(branch)
     except BranchNotFoundError as exc:
         schedule_fail(message=str(exc), name=test_name)
index 0e2bf7c6d74ca97abb01a1fd218d8990015eaa80..cc6eb7b1d7691fb6a00bcfeb76daf16995a0c735 100644 (file)
@@ -79,7 +79,8 @@ def main(ctx):
     beanstalk.watch_tube(connection, ctx.tube)
     result_proc = None
 
-    fetch_teuthology('master')
+    if teuth_config.teuthology_path is None:
+        fetch_teuthology('master')
     fetch_qa_suite('master')
 
     while True:
@@ -116,7 +117,10 @@ def main(ctx):
         job_config['teuthology_branch'] = teuthology_branch
 
         try:
-            teuth_path = fetch_teuthology(branch=teuthology_branch)
+            if teuth_config.teuthology_path is not None:
+                teuth_path = teuth_config.teuthology_path
+            else:
+                teuth_path = fetch_teuthology(branch=teuthology_branch)
             # For the teuthology tasks, we look for suite_branch, and if we
             # don't get that, we look for branch, and fall back to 'master'.
             # last-in-suite jobs don't have suite_branch or branch set.