]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Don't mess with ~/src/teuthology by default
authorZack Cerza <zack@cerza.org>
Thu, 3 Jul 2014 16:18:01 +0000 (10:18 -0600)
committerZack Cerza <zack@cerza.org>
Thu, 3 Jul 2014 16:18:01 +0000 (10:18 -0600)
Setting 'automated_scheduling: True' in ~/.teuthology.yaml enables it.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/config.py
teuthology/suite.py

index 5975cb4704dac49946cb5819fb4767829705ec08..2fd6ff565a29ad9d15fe025989c4793fddc76bd2 100644 (file)
@@ -14,6 +14,7 @@ class Config(object):
     teuthology_yaml = os.path.join(os.environ['HOME'], '.teuthology.yaml')
     defaults = {
         'archive_base': '/var/lib/teuthworker/archive',
+        'automated_scheduling': False,
         'ceph_git_base_url': 'https://github.com/ceph/',
         'lock_server': 'http://teuthology.front.sepia.ceph.com/locker/lock',
         'max_job_time': 259200,  # 3 days
index 40782716bef10612a645e3ff74635c12c6651df5..afbdd96be057a5b63996579916653b94ae32c562 100644 (file)
@@ -122,12 +122,16 @@ def fetch_suite_repo(branch, test_name):
     suite_repo_path = os.path.join(src_base_path,
                                    'ceph-qa-suite_' + branch)
     try:
-        enforce_repo_state(
-            repo_url=os.path.join(config.ceph_git_base_url, 'teuthology.git'),
-            dest_path=os.path.join(src_base_path, 'teuthology'),
-            branch='master',
-            remove_on_error=False,
-        )
+        # When a user is scheduling a test run from their own copy of
+        # teuthology, let's not wreak havoc on it.
+        if config.automated_scheduling:
+            enforce_repo_state(
+                repo_url=os.path.join(config.ceph_git_base_url,
+                                      'teuthology.git'),
+                dest_path=os.path.join(src_base_path, 'teuthology'),
+                branch='master',
+                remove_on_error=False,
+            )
         enforce_repo_state(
             repo_url=os.path.join(config.ceph_git_base_url,
                                   'ceph-qa-suite.git'),