From: Warren Usui Date: Wed, 22 Jun 2016 01:11:12 +0000 (-0700) Subject: Allow force-branch for s3roundtrip tests. X-Git-Tag: v11.1.1~58^2^2~159^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=45900d81f517ab5d6dc166a242251832d8e7b140;p=ceph.git Allow force-branch for s3roundtrip tests. Fixes tracker bug 15453 Signed-off-by: Warren Usui --- diff --git a/tasks/s3roundtrip.py b/tasks/s3roundtrip.py index 4c17144dbae..620b9d42db2 100644 --- a/tasks/s3roundtrip.py +++ b/tasks/s3roundtrip.py @@ -28,13 +28,17 @@ def download(ctx, config): The context passed in should be identical to the context passed in to the main task. """ - assert isinstance(config, list) + assert isinstance(config, dict) log.info('Downloading s3-tests...') testdir = teuthology.get_testdir(ctx) - for client in config: + for (client, cconf) in config.iteritems(): + branch = cconf.get('force-branch', None) + if not branch: + branch = cconf.get('branch', 'master') ctx.cluster.only(client).run( args=[ 'git', 'clone', + '-b', branch, teuth_config.ceph_git_base_url + 's3-tests.git', '{tdir}/s3-tests'.format(tdir=testdir), ], @@ -287,7 +291,7 @@ def task(ctx, config): }) with contextutil.nested( - lambda: download(ctx=ctx, config=clients), + lambda: download(ctx=ctx, config=config), lambda: create_users(ctx=ctx, config=dict( clients=clients, s3tests_conf=s3tests_conf,