Bug 1457629 - Don't create per-test-coverage-reports.zip when no tests are run. r=marco

This patch stops test-coverage (TC/TCw) from trying to create a zip file of the per-test coverage reports when no tests are run.

MozReview-Commit-ID: 6m3TR4oUCLx

--HG--
extra : rebase_source : cc9ae3b90c940913be3526a79461af0cd5617da6
This commit is contained in:
Gregory Mierzwinski 2018-04-29 16:28:57 -04:00
Родитель fda419d39c
Коммит 5276cada21
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -289,6 +289,10 @@ class CodeCoverageMixin(SingleTestMixin):
return
if self.per_test_coverage:
if not self.per_test_reports:
self.info("No tests were found...not saving coverage data.")
return
dest = os.path.join(dirs['abs_blob_upload_dir'], 'per-test-coverage-reports.zip')
with zipfile.ZipFile(dest, 'w', zipfile.ZIP_DEFLATED) as z:
for suite, data in self.per_test_reports.items():