Bug 1428296 - Compress coverage artifacts silently. r?marco draft
authorvinicius <viniciuscosta0197@gmail.com>
Wed, 24 Jan 2018 11:31:02 -0200
changeset 724254 7caa434ff89460471c4769b62e5ff67151ae38cd
parent 723788 c5461973d6ee7845b3f560c05e1502429fd63184
child 747118 a7eecc4ee6f18b8cfb1fd656557f5ea20a448ad2
push id96711
push userbmo:viniciuscosta0197@gmail.com
push dateWed, 24 Jan 2018 19:40:10 +0000
reviewersmarco
bugs1428296
milestone60.0a1
Bug 1428296 - Compress coverage artifacts silently. r?marco MozReview-Commit-ID: CFUhid0rZ3I
testing/mozharness/mozharness/mozilla/testing/codecoverage.py
--- a/testing/mozharness/mozharness/mozilla/testing/codecoverage.py
+++ b/testing/mozharness/mozharness/mozilla/testing/codecoverage.py
@@ -131,17 +131,17 @@ class CodeCoverageMixin(object):
 
     @PostScriptAction('run-tests')
     def _package_coverage_data(self, action, success=None):
         if self.jsd_code_coverage_enabled:
             # Setup the command for compression
             dirs = self.query_abs_dirs()
             jsdcov_dir = dirs['abs_blob_upload_dir']
             zipFile = os.path.join(jsdcov_dir, "jsdcov_artifacts.zip")
-            command = ["zip", "-r", zipFile, ".", "-i", "jscov*.json"]
+            command = ["zip", "-r", "-q", zipFile, ".", "-i", "jscov*.json"]
 
             self.info("Beginning compression of JSDCov artifacts...")
             self.run_command(command, cwd=jsdcov_dir)
 
             # Delete already compressed JSCov artifacts.
             for filename in os.listdir(jsdcov_dir):
                 if filename.startswith("jscov") and filename.endswith(".json"):
                     os.remove(os.path.join(jsdcov_dir, filename))
@@ -160,17 +160,17 @@ class CodeCoverageMixin(object):
             dirs = self.query_abs_dirs()
 
             # Zip gcda files (will be given in input to grcov).
             file_path_gcda = os.path.join(os.getcwd(), 'code-coverage-gcda.zip')
             self.run_command(['zip', '-q', '-0', '-r', file_path_gcda, '.'], cwd=self.gcov_dir)
 
             # Package JSVM coverage data.
             file_path_jsvm = os.path.join(dirs['abs_blob_upload_dir'], 'code-coverage-jsvm.zip')
-            self.run_command(['zip', '-r', file_path_jsvm, '.'], cwd=self.jsvm_dir)
+            self.run_command(['zip', '-r', '-q', file_path_jsvm, '.'], cwd=self.jsvm_dir)
 
             # GRCOV post-processing
             # Download the gcno fom the build machine.
             self.download_file(self.url_to_gcno, file_name=None, parent_dir=self.grcov_dir)
 
             # Run grcov on the zipped .gcno and .gcda files.
             grcov_command = [
                 os.path.join(self.grcov_dir, 'grcov'),
@@ -192,15 +192,15 @@ class CodeCoverageMixin(object):
                 return_type='files',
                 throw_exception=True,
             )
             output_file_name = 'grcov_lcov_output.info'
             shutil.move(grcov_output, os.path.join(self.grcov_dir, output_file_name))
 
             # Zip the grcov output and upload it.
             self.run_command(
-                ['zip', os.path.join(dirs['abs_blob_upload_dir'], 'code-coverage-grcov.zip'), output_file_name],
+                ['zip', '-q', os.path.join(dirs['abs_blob_upload_dir'], 'code-coverage-grcov.zip'), output_file_name],
                 cwd=self.grcov_dir
             )
 
         shutil.rmtree(self.gcov_dir)
         shutil.rmtree(self.jsvm_dir)
         shutil.rmtree(self.grcov_dir)