From b7eecd446da7ce31aefb819981b802e0186c8863 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 3 Jul 2014 10:18:01 -0600 Subject: [PATCH] Don't mess with ~/src/teuthology by default Setting 'automated_scheduling: True' in ~/.teuthology.yaml enables it. Signed-off-by: Zack Cerza --- teuthology/config.py | 1 + teuthology/suite.py | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/teuthology/config.py b/teuthology/config.py index 5975cb4704dac..2fd6ff565a29a 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 40782716bef10..afbdd96be057a 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'), -- 2.39.5