]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
workunit: pass branch/sha1 to test
authorJosh Durgin <josh.durgin@inktank.com>
Fri, 13 Jul 2012 17:00:50 +0000 (10:00 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Fri, 13 Jul 2012 17:01:50 +0000 (10:01 -0700)
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

index 812e7214c34414a517d94915d3239e9b1ec1c4f4..2788c4d56d89527c7013a3a64cf2e56252f7b456 100644 (file)
@@ -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"'),