Bug 1417280 - Don't include intermediate folders in grcov ZIP file. r=jmaher
authorMarco Castelluccio <mcastelluccio@mozilla.com>
Sat, 11 Nov 2017 15:51:53 +0100
changeset 391963 92ecb1d8ad0ccdac59b8e27c22c40a02e06000f9
parent 391962 365135d6f7cc33d21fe75518be52331c348b3138
child 391964 61a5cc67289683738002c68aaedc376210a90762
push id32909
push usercbrindusan@mozilla.com
push dateWed, 15 Nov 2017 22:25:14 +0000
treeherdermozilla-central@f41930a869a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1417280
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1417280 - Don't include intermediate folders in grcov ZIP file. r=jmaher
testing/mozharness/mozharness/mozilla/testing/codecoverage.py
--- a/testing/mozharness/mozharness/mozilla/testing/codecoverage.py
+++ b/testing/mozharness/mozharness/mozilla/testing/codecoverage.py
@@ -177,28 +177,26 @@ class CodeCoverageMixin(object):
                 '-t', 'lcov',
                 '-p', self.prefix,
                 '--ignore-dir', 'gcc',
                 os.path.join(self.grcov_dir, 'target.code-coverage-gcno.zip'), file_path_gcda
             ]
 
             # 'grcov_output' will be a tuple, the first variable is the path to the lcov output,
             # the other is the path to the standard error output.
-            grcov_output = self.get_output_from_command(
+            grcov_output, _ = self.get_output_from_command(
                 grcov_command,
-                cwd=self.grcov_dir,
                 silent=True,
-                tmpfile_base_path=os.path.join(self.grcov_dir, 'grcov_lcov_output'),
                 save_tmpfiles=True,
                 return_type='files'
             )
-            new_output_name = grcov_output[0] + '.info'
-            os.rename(grcov_output[0], new_output_name)
+            output_file_name = 'grcov_lcov_output.info'
+            os.rename(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'), new_output_name],
+                ['zip', 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)