From 52cb75acf391b3d0a64d22cd2ad9f23726721e26 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 7 Feb 2020 17:55:32 -0600 Subject: [PATCH] qa/tasks/workunit: accept coverage_and_limits: false Allow workunits without teuthology tools (normally installed by ceph.py, IIRC). Signed-off-by: Sage Weil --- qa/tasks/workunit.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/qa/tasks/workunit.py b/qa/tasks/workunit.py index 99f511befb0..6eb850a75cb 100644 --- a/qa/tasks/workunit.py +++ b/qa/tasks/workunit.py @@ -122,7 +122,9 @@ def task(ctx, config): p.spawn(_run_tests, ctx, refspec, role, tests, config.get('env'), basedir=config.get('basedir','qa/workunits'), - timeout=timeout,cleanup=cleanup) + timeout=timeout, + cleanup=cleanup, + coverage_and_limits=not config.get('no_coverage_and_limits', None)) if cleanup: # Clean up dirs from any non-all workunits @@ -294,7 +296,8 @@ def _spawn_on_all_clients(ctx, refspec, tests, env, basedir, subdir, timeout=Non def _run_tests(ctx, refspec, role, tests, env, basedir, - subdir=None, timeout=None, cleanup=True): + subdir=None, timeout=None, cleanup=True, + coverage_and_limits=True): """ Run the individual test. Create a scratch directory and then extract the workunits from git. Make the executables, and then run the tests. @@ -393,10 +396,11 @@ def _run_tests(ctx, refspec, role, tests, env, basedir, quoted_val = pipes.quote(val) env_arg = '{var}={val}'.format(var=var, val=quoted_val) args.append(run.Raw(env_arg)) - args.extend([ - 'adjust-ulimits', - 'ceph-coverage', - '{tdir}/archive/coverage'.format(tdir=testdir)]) + if coverage_and_limits: + args.extend([ + 'adjust-ulimits', + 'ceph-coverage', + '{tdir}/archive/coverage'.format(tdir=testdir)]) if timeout and timeout != '0': args.extend(['timeout', timeout]) args.extend([ -- 2.39.5