]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/workunit: accept coverage_and_limits: false
authorSage Weil <sage@redhat.com>
Fri, 7 Feb 2020 23:55:32 +0000 (17:55 -0600)
committerSage Weil <sage@redhat.com>
Fri, 7 Feb 2020 23:57:45 +0000 (17:57 -0600)
Allow workunits without teuthology tools (normally installed by ceph.py,
IIRC).

Signed-off-by: Sage Weil <sage@redhat.com>
qa/tasks/workunit.py

index 99f511befb0419090d5bff119ddb952db704cf4c..6eb850a75cb569599ff0b375b90f8b0f20f20ff1 100644 (file)
@@ -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([