Bug 1673071 - Update marionette mozinfo object with correct webrender status. r=whimboo,marionette-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D95428
This commit is contained in:
Kartikaya Gupta 2020-11-03 23:05:10 +00:00
Родитель facbc561d9
Коммит 5b1b570dcc
2 изменённых файлов: 11 добавлений и 11 удалений

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

@ -1133,6 +1133,14 @@ class BaseMarionetteTestRunner(object):
manifest.read(filepath)
json_path = update_mozinfo(filepath)
mozinfo.update(
{
"appname": self.appName,
"manage_instance": self.marionette.instance is not None,
"headless": self.headless,
"webrender": self.enable_webrender,
}
)
self.logger.info("mozinfo updated from: {}".format(json_path))
self.logger.info("mozinfo is: {}".format(mozinfo.info))
@ -1140,15 +1148,8 @@ class BaseMarionetteTestRunner(object):
if self.test_tags:
filters.append(tags(self.test_tags))
values = {
"appname": self.appName,
"manage_instance": self.marionette.instance is not None,
"headless": self.headless,
}
values.update(mozinfo.info)
manifest_tests = manifest.active_tests(
exists=False, disabled=True, filters=filters, **values
exists=False, disabled=True, filters=filters, **mozinfo.info
)
if len(manifest_tests) == 0:
self.logger.error(

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

@ -7,6 +7,7 @@ from __future__ import absolute_import
import os
import manifestparser
import mozinfo
import mozunit
import pytest
@ -356,9 +357,7 @@ def get_kwargs_passed_to_manifest(mock_runner, manifest, monkeypatch, **kwargs):
monkeypatch.setattr(
"marionette_harness.runner.base.TestManifest", manifest.manifest_class
)
monkeypatch.setattr(
"marionette_harness.runner.base.mozinfo.info", {"mozinfo_key": "mozinfo_val"}
)
monkeypatch.setitem(mozinfo.info, "mozinfo_key", "mozinfo_val")
for attr in kwargs:
setattr(mock_runner, attr, kwargs[attr])
mock_runner.marionette = mock_runner.driverclass()