From: Venky Shankar Date: Fri, 9 Dec 2016 09:41:49 +0000 (+0530) Subject: cram: support fetching from sha1 branch, tag, commit hash X-Git-Tag: v0.94.10~4^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6045a83a438918f445504224b80809dfe715c9b0;p=ceph.git cram: support fetching from sha1 branch, tag, commit hash Signed-off-by: Venky Shankar (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) --- diff --git a/qa/suites/rbd/singleton/all/formatted-output.yaml b/qa/suites/rbd/singleton/all/formatted-output.yaml index 8b118b189285..26d3d33963ce 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=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 diff --git a/qa/tasks/cram.py b/qa/tasks/cram.py index 05138af4de03..f1d63a3e9119 100644 --- a/qa/tasks/cram.py +++ b/qa/tasks/cram.py @@ -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), ], )