From 237fb80f2b2874329aed25ba655a6789e1707114 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Fri, 6 Jan 2017 21:06:11 +0100 Subject: [PATCH] tests: subst repo name in qa/tasks/cram.py Inspired by bcbe45d948f1c4da02e27b3be5f29a8b52745e28 Fixes: http://tracker.ceph.com/issues/18440 Signed-off-by: Nathan Cutler (cherry picked from commit 56e37e41f4dddd289dd3c1886b192cd328ed311b) --- qa/suites/rbd/singleton/all/formatted-output.yaml | 2 +- qa/tasks/cram.py | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/qa/suites/rbd/singleton/all/formatted-output.yaml b/qa/suites/rbd/singleton/all/formatted-output.yaml index 26d3d33963ce7..1766be469c460 100644 --- a/qa/suites/rbd/singleton/all/formatted-output.yaml +++ b/qa/suites/rbd/singleton/all/formatted-output.yaml @@ -6,4 +6,4 @@ tasks: - cram: clients: client.0: - - http://git.ceph.com/?p=ceph.git;a=blob_plain;hb={branch};f=src/test/cli-integration/rbd/formatted-output.t + - http://git.ceph.com/?p={repo};a=blob_plain;hb={branch};f=src/test/cli-integration/rbd/formatted-output.t diff --git a/qa/tasks/cram.py b/qa/tasks/cram.py index f1d63a3e91191..81ef9a6dba6b5 100644 --- a/qa/tasks/cram.py +++ b/qa/tasks/cram.py @@ -7,6 +7,7 @@ import os from teuthology import misc as teuthology from teuthology.parallel import parallel from teuthology.orchestra import run +from teuthology.config import config as teuth_config log = logging.getLogger(__name__) @@ -61,6 +62,12 @@ def task(ctx, config): if refspec is None: refspec = 'HEAD' + # hack: the git_url is always ceph-ci or ceph + git_url = teuth_config.get_ceph_git_url() + repo_name = 'ceph.git' + if git_url.count('ceph-ci'): + repo_name = 'ceph-ci.git' + try: for client, tests in clients.iteritems(): (remote,) = ctx.cluster.only(client).remotes.iterkeys() @@ -76,11 +83,12 @@ def task(ctx, config): ], ) for test in tests: - log.info('fetching test %s for %s', test, client) + url = test.format(repo=repo_name, branch=refspec) + log.info('fetching test %s for %s', url, client) assert test.endswith('.t'), 'tests must end in .t' remote.run( args=[ - 'wget', '-nc', '-nv', '-P', client_dir, '--', test.format(branch=refspec), + 'wget', '-nc', '-nv', '-P', client_dir, '--', url, ], ) -- 2.39.5