]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cram: support fetching from sha1 branch, tag, commit hash
authorVenky Shankar <vshankar@redhat.com>
Fri, 9 Dec 2016 09:41:49 +0000 (15:11 +0530)
committerVenky Shankar <vshankar@redhat.com>
Sun, 11 Dec 2016 11:16:36 +0000 (16:46 +0530)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
suites/krbd/unmap/tasks/unmap.yaml
suites/rbd/singleton/all/formatted-output.yaml
tasks/cram.py

index b9f0546f5fe49bdfec42c0cc9f8d381d7505e9c0..f56c560260682272a2ffcacf98e9389b800fd43c 100644 (file)
@@ -2,4 +2,4 @@ tasks:
 - cram:
     clients:
       client.0:
-      - http://git.ceph.com/?p=ceph.git;a=blob_plain;f=src/test/cli-integration/rbd/unmap.t
+      - http://git.ceph.com/?p=ceph.git;a=blob_plain;hb={branch};f=src/test/cli-integration/rbd/unmap.t
index c78424c2b179d48580d3aa851a6fd64e3ccc79ff..526cc038febb0c1bda8f9c02ef522ee6bd37686d 100644 (file)
@@ -7,4 +7,4 @@ tasks:
 - cram:
     clients:
       client.0:
-      - http://git.ceph.com/?p=ceph.git;a=blob_plain;f=src/test/cli-integration/rbd/formatted-output.t
+      - http://git.ceph.com/?p=ceph.git;a=blob_plain;hb={branch};f=src/test/cli-integration/rbd/formatted-output.t
index 05138af4de03a5ea451491ed9c839ee5b8d56220..f1d63a3e91191c786f5c3638c19b2685478a4cff 100644 (file)
@@ -29,6 +29,7 @@ def task(ctx, config):
               - http://ceph.com/qa/test.t
               - http://ceph.com/qa/test2.t]
               client.1: [http://ceph.com/qa/test.t]
+            branch: foo
 
     You can also run a list of cram tests on all clients::
 
@@ -49,6 +50,17 @@ def task(ctx, config):
                                                   config['clients'])
     testdir = teuthology.get_testdir(ctx)
 
+    overrides = ctx.config.get('overrides', {})
+    teuthology.deep_merge(config, overrides.get('workunit', {}))
+
+    refspec = config.get('branch')
+    if refspec is None:
+        refspec = config.get('tag')
+    if refspec is None:
+        refspec = config.get('sha1')
+    if refspec is None:
+        refspec = 'HEAD'
+
     try:
         for client, tests in clients.iteritems():
             (remote,) = ctx.cluster.only(client).remotes.iterkeys()
@@ -68,7 +80,7 @@ def task(ctx, config):
                 assert test.endswith('.t'), 'tests must end in .t'
                 remote.run(
                     args=[
-                        'wget', '-nc', '-nv', '-P', client_dir, '--', test,
+                        'wget', '-nc', '-nv', '-P', client_dir, '--', test.format(branch=refspec),
                         ],
                     )