From 2ed9f648a8a7f653bffeae16497e94fd3825565f Mon Sep 17 00:00:00 2001 From: Joe Buck Date: Fri, 22 Mar 2013 11:56:50 -0700 Subject: [PATCH] teuthology: cleanup client dirs for workunit task This patch corrects an issue where a workunit task is not cleaning up generated directories if the 'all' key is used to specify clients. Signed-off-by: Joe Buck Reviewed-by: Sam Lang --- teuthology/task/workunit.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/teuthology/task/workunit.py b/teuthology/task/workunit.py index 339c46e64f44e..d7f4aca04d539 100644 --- a/teuthology/task/workunit.py +++ b/teuthology/task/workunit.py @@ -212,6 +212,11 @@ def _spawn_on_all_clients(ctx, refspec, tests, env, subdir): for remote, role in client_remotes: p.spawn(_run_tests, ctx, refspec, role, [unit], env, subdir) + # cleanup the generated client directories + client_generator = teuthology.all_roles_of_type(ctx.cluster, 'client') + for client in client_generator: + _delete_dir(ctx, 'client.{id}'.format(id=client), subdir) + def _run_tests(ctx, refspec, role, tests, env, subdir=None): testdir = teuthology.get_testdir(ctx) assert isinstance(role, basestring) -- 2.39.5