From 0e08444924e464b929f17bc943c12059d8263aa8 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sun, 6 Dec 2015 13:07:13 +0100 Subject: [PATCH] workunit: keep the path to the list of tests in a variable Signed-off-by: Loic Dachary (cherry picked from commit 28dc5c0c3347b41bae24a4fa7db491002c4fe2ec) --- tasks/workunit.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tasks/workunit.py b/tasks/workunit.py index 943456b73283b..a2010b34a832f 100644 --- a/tasks/workunit.py +++ b/tasks/workunit.py @@ -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, ], ) -- 2.39.5