From: Sam Lang Date: Thu, 8 Nov 2012 14:55:36 +0000 (-0600) Subject: workunit: Move cleanup to separate run X-Git-Tag: 1.1.0~2422 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=96458387c74a82f3af427e03326350710eea2985;p=teuthology.git 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 --- 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(