From 58126b01fd97c4480cada287cf4f872cdb931288 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Fri, 13 Jul 2012 10:00:50 -0700 Subject: [PATCH] workunit: pass branch/sha1 to test Some tests download things from the ceph repo. Let them know which version to use through the CEPH_REF environment variable. --- teuthology/task/workunit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/teuthology/task/workunit.py b/teuthology/task/workunit.py index 812e7214c3..2788c4d56d 100644 --- a/teuthology/task/workunit.py +++ b/teuthology/task/workunit.py @@ -123,6 +123,8 @@ def _run_tests(ctx, role, tests, env): secretfile = '/tmp/cephtest/data/{role}.secret'.format(role=role) teuthology.write_secret_file(remote, role, secretfile) + ceph_ref = ctx.summary.get('ceph-sha1', 'master') + remote.run( logger=log.getChild(role), args=[ @@ -172,6 +174,7 @@ def _run_tests(ctx, role, tests, env): run.Raw('&&'), 'cd', '--', scratch_tmp, run.Raw('&&'), + run.Raw('CEPH_REF={ref}'.format(ref=ceph_ref)), run.Raw('PATH="$PATH:/tmp/cephtest/binary/usr/local/bin"'), run.Raw('LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/tmp/cephtest/binary/usr/local/lib"'), run.Raw('CEPH_CONF="/tmp/cephtest/ceph.conf"'), -- 2.39.5