From 5b1b570dcc992d1cbc04fea6089a95e0556ea075 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Tue, 3 Nov 2020 23:05:10 +0000 Subject: [PATCH] Bug 1673071 - Update marionette mozinfo object with correct webrender status. r=whimboo,marionette-reviewers Differential Revision: https://phabricator.services.mozilla.com/D95428 --- .../harness/marionette_harness/runner/base.py | 17 +++++++++-------- .../harness_unit/test_marionette_runner.py | 5 ++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/testing/marionette/harness/marionette_harness/runner/base.py b/testing/marionette/harness/marionette_harness/runner/base.py index 279817252ded..6cb6aca093ab 100644 --- a/testing/marionette/harness/marionette_harness/runner/base.py +++ b/testing/marionette/harness/marionette_harness/runner/base.py @@ -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( diff --git a/testing/marionette/harness/marionette_harness/tests/harness_unit/test_marionette_runner.py b/testing/marionette/harness/marionette_harness/tests/harness_unit/test_marionette_runner.py index 89dd080e9dc8..35077dd47d9c 100644 --- a/testing/marionette/harness/marionette_harness/tests/harness_unit/test_marionette_runner.py +++ b/testing/marionette/harness/marionette_harness/tests/harness_unit/test_marionette_runner.py @@ -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()