Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
purposes, but it will still be used for test
running. The <suite_dir> must have `qa/suite`
sub-directory.
--teuthology-repo <teuthology_repo>
Use this repository for teuthology run
[default: {default_teuthology_repo}]
--validate-sha1 <bool>
Validate that git SHA1s passed to -S exist.
[default: true]
Expand Down Expand Up @@ -222,6 +225,8 @@
config.get_ceph_git_url()),
default_suite_repo=defaults('--suite-repo',
config.get_ceph_qa_suite_git_url()),
default_teuthology_repo=defaults('--teuthology-repo',
config.get_teuthology_git_url()),
default_ceph_branch=defaults('--ceph-branch', 'main'),
default_job_threshold=config.job_threshold,
)
Expand Down
5 changes: 4 additions & 1 deletion teuthology/dispatcher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,12 @@ def prep_job(job_config, log_file_path, archive_dir):
# store that value.
teuthology_branch = job_config.get('teuthology_branch', 'main')
job_config['teuthology_branch'] = teuthology_branch
teuthology_repo = job_config.get('teuthology_repo')
if teuthology_repo:
teuth_config.teuthology_git_url = teuthology_repo
teuthology_sha1 = job_config.get('teuthology_sha1')
if not teuthology_sha1:
repo_url = repo_utils.build_git_url('teuthology', 'ceph')
repo_url = teuth_config.get_teuthology_git_url()
try:
teuthology_sha1 = repo_utils.ls_remote(repo_url, teuthology_branch)
except Exception as exc:
Expand Down
6 changes: 6 additions & 0 deletions teuthology/suite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ def override_arg_defaults(name, default, env=os.environ):
env_arg = {
'--ceph-repo' : 'TEUTH_CEPH_REPO',
'--suite-repo' : 'TEUTH_SUITE_REPO',
'--teuthology-repo' : 'TEUTH_REPO',
'--ceph-branch' : 'TEUTH_CEPH_BRANCH',
'--suite-branch' : 'TEUTH_SUITE_BRANCH',
'--teuthology-branch' : 'TEUTH_BRANCH',
}
if name in env_arg and env_arg[name] in env.keys():
variable = env_arg[name]
Expand Down Expand Up @@ -79,6 +81,10 @@ def process_args(args):
value = expand_short_repo_name(
value,
config.get_ceph_qa_suite_git_url())
elif key == 'teuthology_repo':
value = expand_short_repo_name(
value,
config.get_teuthology_git_url())
elif key in ('validate_sha1', 'filter_fragments', 'kdb'):
value = strtobool(value)
conf[key] = value
Expand Down
1 change: 1 addition & 0 deletions teuthology/suite/placeholder.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def _substitute(input_dict, values_dict):
'branch': Placeholder('ceph_branch'),
'expire': Placeholder('expire'),
'sha1': Placeholder('ceph_hash'),
'teuthology_repo': Placeholder('teuthology_repo'),
'teuthology_branch': Placeholder('teuthology_branch'),
'teuthology_sha1': Placeholder('teuthology_sha1'),
'archive_upload': Placeholder('archive_upload'),
Expand Down
3 changes: 3 additions & 0 deletions teuthology/suite/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def __init__(self, args):
config.ceph_git_url = self.args.ceph_repo
if self.args.suite_repo:
config.ceph_qa_suite_git_url = self.args.suite_repo
if self.args.teuthology_repo:
config.teuthology_git_url = self.args.teuthology_repo

self.base_config = self.create_initial_config()

Expand Down Expand Up @@ -123,6 +125,7 @@ def create_initial_config(self):
ceph_repo=config.get_ceph_git_url(),
teuthology_branch=teuthology_branch,
teuthology_sha1=teuthology_sha1,
teuthology_repo=config.get_teuthology_git_url(),
machine_type=self.args.machine_type,
distro=self.os.name,
distro_version=self.os.version,
Expand Down
2 changes: 2 additions & 0 deletions teuthology/suite/test/test_placeholder.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def test_substitute_placeholders(self):
ceph_branch='ceph_branch',
ceph_hash='ceph_hash',
teuthology_branch='teuthology_branch',
teuthology_repo='https://example.com/ceph/teuthology.git',
teuthology_sha1='teuthology_sha1',
machine_type='machine_type',
distro='distro',
Expand Down Expand Up @@ -41,6 +42,7 @@ def test_null_placeholders_dropped(self):
ceph_branch='ceph_branch',
ceph_hash='ceph_hash',
teuthology_branch='teuthology_branch',
teuthology_repo='https://example.com/ceph/teuthology.git',
teuthology_sha1='teuthology_sha1',
machine_type='machine_type',
archive_upload='archive_upload',
Expand Down
1 change: 1 addition & 0 deletions teuthology/suite/test/test_run_.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ def test_successful_schedule(
'suite_sha1',
'tasks',
'teuthology_branch',
'teuthology_repo',
'teuthology_sha1',
'timestamp',
'user',
Expand Down
Loading