]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Drop results.generate_coverage() 1497/head
authorZack Cerza <zack@redhat.com>
Thu, 28 May 2020 16:56:54 +0000 (10:56 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 28 May 2020 17:19:13 +0000 (11:19 -0600)
This was just an oversight from #1419

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/results.py

index 4ffc85cc479524d125daf4716e0474d481995325..2e16d764cb70c185966fa65da1f938d374b4d974 100644 (file)
@@ -1,8 +1,6 @@
 import os
-import sys
 import time
 import logging
-import subprocess
 from collections import OrderedDict
 from textwrap import dedent
 from textwrap import fill
@@ -67,46 +65,18 @@ def results(archive_dir, name, email, timeout, dry_run):
 
     (subject, body) = build_email_body(name)
 
-    try:
-        if email and dry_run:
-            print("From: %s" % (config.results_sending_email or 'teuthology'))
-            print("To: %s" % email)
-            print("Subject: %s" % subject)
-            print(body)
-        elif email:
-            email_results(
-                subject=subject,
-                from_=(config.results_sending_email or 'teuthology'),
-                to=email,
-                body=body,
-            )
-    finally:
-        generate_coverage(archive_dir, name)
-
-
-def generate_coverage(archive_dir, name):
-    coverage_config_keys = ('coverage_output_dir', 'coverage_html_dir',
-                            'coverage_tools_dir')
-    for key in coverage_config_keys:
-        if key not in config.to_dict():
-            log.warn(
-                "'%s' not in teuthology config; skipping coverage report",
-                key)
-            return
-    log.info('starting coverage generation')
-    subprocess.Popen(
-        args=[
-            os.path.join(os.path.dirname(sys.argv[0]), 'teuthology-coverage'),
-            '-v',
-            '-o',
-            os.path.join(config.coverage_output_dir, name),
-            '--html-output',
-            os.path.join(config.coverage_html_dir, name),
-            '--cov-tools-dir',
-            config.coverage_tools_dir,
-            archive_dir,
-        ],
-    )
+    if email and dry_run:
+        print("From: %s" % (config.results_sending_email or 'teuthology'))
+        print("To: %s" % email)
+        print("Subject: %s" % subject)
+        print(body)
+    elif email:
+        email_results(
+            subject=subject,
+            from_=(config.results_sending_email or 'teuthology'),
+            to=email,
+            body=body,
+        )
 
 
 def email_results(subject, from_, to, body):