]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: subst repo name in qa/tasks/cram.py
authorNathan Cutler <ncutler@suse.com>
Fri, 6 Jan 2017 20:06:11 +0000 (21:06 +0100)
committerNathan Cutler <ncutler@suse.com>
Sun, 8 Jan 2017 18:46:14 +0000 (19:46 +0100)
Inspired by bcbe45d948f1c4da02e27b3be5f29a8b52745e28

Fixes: http://tracker.ceph.com/issues/18440
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 56e37e41f4dddd289dd3c1886b192cd328ed311b)

qa/suites/rbd/singleton/all/formatted-output.yaml
qa/tasks/cram.py

index 26d3d33963ce700e17929a4fc340caac793c873b..1766be469c460b0db4a6359963dccad74ec2555b 100644 (file)
@@ -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
index f1d63a3e91191c786f5c3638c19b2685478a4cff..81ef9a6dba6b52e327a273ecd2f93ee9986e7e50 100644 (file)
@@ -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,
                         ],
                     )