From: Zack Cerza Date: Thu, 3 Jul 2014 16:18:01 +0000 (-0600) Subject: Don't mess with ~/src/teuthology by default X-Git-Tag: 1.1.0~1348 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b7eecd446da7ce31aefb819981b802e0186c8863;p=teuthology.git Don't mess with ~/src/teuthology by default Setting 'automated_scheduling: True' in ~/.teuthology.yaml enables it. Signed-off-by: Zack Cerza --- diff --git a/teuthology/config.py b/teuthology/config.py index 5975cb4704..2fd6ff565a 100644 --- a/teuthology/config.py +++ b/teuthology/config.py @@ -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 diff --git a/teuthology/suite.py b/teuthology/suite.py index 40782716be..afbdd96be0 100644 --- a/teuthology/suite.py +++ b/teuthology/suite.py @@ -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'),