From 96458387c74a82f3af427e03326350710eea2985 Mon Sep 17 00:00:00 2001 From: Sam Lang Date: Thu, 8 Nov 2012 08:55:36 -0600 Subject: [PATCH] workunit: Move cleanup to separate run Removing the scratchdir in the remote run command at the end of the script invocation will do the remove once the first script finishes. With possibly a shared scratch dir across workunit clients, we want to wait to remove the scratch dir once all the workunit scripts have completed. Signed-off-by: Sam Lang --- teuthology/task/workunit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/teuthology/task/workunit.py b/teuthology/task/workunit.py index 536f9bd906..05efa07ffc 100644 --- a/teuthology/task/workunit.py +++ b/teuthology/task/workunit.py @@ -216,13 +216,15 @@ def _run_tests(ctx, refspec, role, tests, env, subdir): srcdir=srcdir, workunit=workunit, ), - run.Raw('&&'), - 'rm', '-rf', '--', scratch_tmp, ]) remote.run( logger=log.getChild(role), args=args, ) + remote.run( + logger=log.getChild(role), + args=['rm', '-rf', '--', scratch_tmp], + ) finally: log.info('Stopping %s on %s...', spec, role) remote.run( -- 2.39.5