Bug 1323831 - Fix skip-if filter for appname if no mozinfo.json can be found.
MozReview-Commit-ID: HR8Ja8Q6l88
--- a/testing/marionette/harness/marionette_harness/runner/base.py
+++ b/testing/marionette/harness/marionette_harness/runner/base.py
@@ -924,28 +924,34 @@ class BaseMarionetteTestRunner(object):
return
file_ext = os.path.splitext(os.path.split(filepath)[-1])[1]
if file_ext == '.ini':
manifest = TestManifest()
manifest.read(filepath)
+ json_path = update_mozinfo(filepath)
+ self.logger.info("mozinfo updated from: {}".format(json_path))
+ self.logger.info("mozinfo is: {}".format(mozinfo.info))
+
filters = []
if self.test_tags:
filters.append(tags(self.test_tags))
- update_mozinfo(filepath)
- self.logger.info("mozinfo updated with the following: {}".format(None))
- self.logger.info("mozinfo is: {}".format(mozinfo.info))
+
+ values = {
+ "appname": self.appName,
+ "e10s": self.e10s,
+ }
+ values.update(mozinfo.info)
+
manifest_tests = manifest.active_tests(exists=False,
disabled=True,
filters=filters,
- app=self.appName,
- e10s=self.e10s,
- **mozinfo.info)
+ **values)
if len(manifest_tests) == 0:
self.logger.error("No tests to run using specified "
"combination of filters: {}".format(
manifest.fmt_filters()))
target_tests = []
for test in manifest_tests:
if test.get('disabled'):
--- 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
@@ -322,17 +322,17 @@ def get_kwargs_passed_to_manifest(mock_r
call_args, call_kwargs = manifest.manifest_class().active_tests.call_args
return call_kwargs
def test_manifest_basic_args(mock_runner, manifest, monkeypatch):
kwargs = get_kwargs_passed_to_manifest(mock_runner, manifest, monkeypatch)
assert kwargs['exists'] is False
assert kwargs['disabled'] is True
- assert kwargs['app'] == 'fake_app'
+ assert kwargs['appname'] == 'fake_app'
assert 'mozinfo_key' in kwargs and kwargs['mozinfo_key'] == 'mozinfo_val'
@pytest.mark.parametrize('e10s', (True, False))
def test_manifest_with_e10s(mock_runner, manifest, monkeypatch, e10s):
kwargs = get_kwargs_passed_to_manifest(mock_runner, manifest, monkeypatch, e10s=e10s)
assert kwargs['e10s'] == e10s