Bug 1491390 - When searching for baseline coverage tests, only look at the test name. r=jmaher

This patch fixes an issue where a suite was being found in the full path to the test which led to the baseline coverage tests being considered on a per-suite basis (like browser-chrome), when it should be on a per-file-extension basis for '.html' files. This is fixed by only considering the test name and excluding the full path to it.

Differential Revision: https://phabricator.services.mozilla.com/D5890

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Gregory Mierzwinski 2018-09-14 18:57:16 +00:00
Родитель a2db8cd913
Коммит 6bb72e3c1c
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -419,7 +419,7 @@ class CodeCoverageMixin(SingleTestMixin):
with open(grcov_file, 'r') as f:
data = json.load(f)
if suite in test:
if suite in os.path.split(test)[-1]:
baseline_tests_suite_cov[suite] = data
else:
_, baseline_filetype = os.path.splitext(test)