]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
workunit: keep the path to the list of tests in a variable
authorLoic Dachary <ldachary@redhat.com>
Sun, 6 Dec 2015 12:07:13 +0000 (13:07 +0100)
committerLoic Dachary <ldachary@redhat.com>
Fri, 11 Dec 2015 11:34:04 +0000 (12:34 +0100)
Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 28dc5c0c3347b41bae24a4fa7db491002c4fe2ec)

tasks/workunit.py

index 943456b73283bcd442c8790ce9ebf662b4e94a32..a2010b34a832fb1f550ba567f26a37dc7633e38f 100644 (file)
@@ -312,9 +312,8 @@ def _run_tests(ctx, refspec, role, tests, env, subdir=None, timeout=None):
         ],
     )
 
-    workunits = sorted(misc.get_file(
-        remote,
-        '{tdir}/workunits.list.{role}'.format(tdir=testdir, role=role)).split('\0'))
+    workunits_file = '{tdir}/workunits.list.{role}'.format(tdir=testdir, role=role)
+    workunits = sorted(misc.get_file(remote, workunits_file).split('\0'))
     assert workunits
 
     try:
@@ -369,6 +368,6 @@ def _run_tests(ctx, refspec, role, tests, env, subdir=None, timeout=None):
         remote.run(
             logger=log.getChild(role),
             args=[
-                'rm', '-rf', '--', '{tdir}/workunits.list.{role}'.format(tdir=testdir, role=role), srcdir,
+                'rm', '-rf', '--', workunits_file, srcdir,
             ],
         )