]> 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)
committerNathan Cutler <ncutler@suse.com>
Sun, 8 Jan 2017 18:45:18 +0000 (19:45 +0100)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit d2f0d745987a2e2eee4e1822146aad8da5d42708)

Conflicts:
suites/krbd/unmap/tasks/unmap.yaml (hammer doesn't have this)
suites/rbd/singleton/all/formatted-output.yaml (moved to qa/,
            trivial resolution)

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

index 8b118b18928504ccd15dbbdb8dc684da82452f4d..26d3d33963ce700e17929a4fc340caac793c873b 100644 (file)
@@ -6,4 +6,4 @@ tasks:
 - cram:
     clients:
       client.0:
-      - http://git.ceph.com/?p=ceph.git;a=blob_plain;hb=hammer;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),
                         ],
                     )