Bug 1429687 - Fix existing tests r=rwood
authorIonut Goldan <igoldan@mozilla.com>
Tue, 05 Jun 2018 12:16:29 +0300
changeset 421819 c6bf8562cf6ddc938423233fe21598d679570f06
parent 421818 4321a242f5f79de5ed5f37567a70bb38b0fe4ba4
child 421820 fcbec6eece3f7ebbf006b5daeef939c2b4df3a1e
push id104125
push useraciure@mozilla.com
push dateThu, 07 Jun 2018 21:57:03 +0000
treeherdermozilla-inbound@38c222c1bf73 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrwood
bugs1429687
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1429687 - Fix existing tests r=rwood MozReview-Commit-ID: G3ukD0Xn0lk
testing/talos/talos/unittests/test_config.py
testing/talos/talos/unittests/test_test.py
--- a/testing/talos/talos/unittests/test_config.py
+++ b/testing/talos/talos/unittests/test_config.py
@@ -112,17 +112,17 @@ class Test_get_test(object):
         assert test_dict['linux_counters'] == counters
         assert test_dict['mac_counters'] == counters
         assert test_dict['win_counters'] == counters
         assert test_dict['w7_counters'] == counters
         assert set(test_dict['xperf_counters']) == set(counters + ['counter_extra'])
 
 
 class Test_get_browser_config(object):
-    required = ('preferences', 'extensions', 'browser_path', 'browser_wait',
+    required = ('extensions', 'browser_path', 'browser_wait',
                 'extra_args', 'buildid', 'env', 'init_url', 'webserver')
     optional = ['bcontroller_config',
                 'branch_name',
                 'child_process',
                 'debug',
                 'debugger',
                 'debugger_args',
                 'develop',
@@ -150,40 +150,30 @@ class Test_get_browser_config(object):
         config_missing_title = dict.fromkeys(self.required, '')
 
         with pytest.raises(KeyError):
             get_browser_config(config_missing_title)
 
     def test_raises_keyerror_for_required_keys(self):
         config_missing_required = dict.fromkeys(self.required, '')
         config_missing_required.update(title='is_mandatory')
-        del config_missing_required['preferences']
+        del config_missing_required['extensions']
 
         with pytest.raises(KeyError):
             get_browser_config(config_missing_required)
 
     def test_doesnt_raise_on_missing_optionals(self):
         config_missing_optionals = dict.fromkeys(self.required, '')
         config_missing_optionals['title'] = 'is_mandatory'
 
         try:
             get_browser_config(config_missing_optionals)
         except KeyError:
             pytest.fail('Must not raise exception on missing optional')
 
-    def test_browser_keys_are_subset_from_config(self):
-        config_extensive = dict.fromkeys(self.required, '')
-        config_extensive.update(dict.fromkeys(self.optional, ''))
-        config_extensive['title'] = 'is_mandatory'
-        config_extensive['extra_custom_key'] = 'value'
-
-        browser_config = get_browser_config(config_extensive)
-        assert browser_config != config_extensive
-        assert set(browser_config).issubset(set(config_extensive))
-
 
 class Test_get_config(object):
     @classmethod
     def setup_class(cls):
         cls.argv = '--suite other-e10s --mainthread -e /some/random/path'.split()
         cls.argv_unprovided_tests = '-e /some/random/path'.split()
         cls.argv_unknown_suite = '--suite random-unknown-suite -e /some/random/path'.split()
         cls.argv_overrides_defaults = '''
@@ -428,16 +418,17 @@ class Test_get_config(object):
         assert test_config['name'] == 'cpstartup'
         assert test_config['tpcycles'] == 1
         assert test_config['tpmanifest'] != '${talos}/tests/cpstartup/cpstartup.manifest'
         assert test_config['tppagecycles'] == 20
         assert test_config['gecko_profile_entries'] == 1000000
         assert test_config['tploadnocache'] is True
         assert test_config['unit'] == 'ms'
         assert test_config['preferences'] == {
+            'addon.test.cpstartup.webserver': '${webserver}',
             'browser.link.open_newwindow': 3,
             'browser.link.open_newwindow.restriction': 2,
         }
 
     def test_tabpaint_has_expected_attributes(self):
         config = get_config(self.argv_tabpaint)
         test_config = config['tests'][0]
 
@@ -653,17 +644,17 @@ class Test_get_config(object):
         assert test_config['linux_counters'] == ['XRes']
         assert test_config['mac_counters'] == []
         assert test_config['responsiveness'] is True
         assert test_config['gecko_profile_interval'] == 2
         assert test_config['gecko_profile_entries'] == 4000000
         assert test_config['filters'] is not None
         assert test_config['timeout'] == 1800
         assert test_config['unit'] == 'ms'
-        assert test_config['webextensions'] == '${talos}/webextensions/dummy/dummy-signed.xpi'
+        assert test_config['webextensions'] == '${talos}/webextensions/dummy/dummy.xpi'
         assert test_config['preferences'] == {'xpinstall.signatures.required': False}
 
     @mock.patch('talos.config.build_manifest', conftest.patched_build_manifest)
     def test_tp5o_scroll_has_expected_attributes(self):
         config = get_config(self.argv_tp5o_scroll)
         test_config = config['tests'][0]
 
         assert test_config['name'] == 'tp5o_scroll'
@@ -932,33 +923,33 @@ class Test_get_config(object):
         assert test_config['name'] == 'tp6_google'
         assert test_config['tpcycles'] == 1
         assert test_config['tppagecycles'] == 25
         assert test_config['gecko_profile_interval'] == 1
         assert test_config['gecko_profile_entries'] == 2000000
         assert test_config['filters'] is not None
         assert test_config['unit'] == 'ms'
         assert test_config['lower_is_better'] is True
-        assert test_config['fnbpaint'] is True
+        assert test_config['fnbpaint'] is False
         assert test_config['tpmanifest'] != \
             '${talos}/tests/quantum_pageload/quantum_pageload_google.manifest'
 
     def test_tp6_google_heavy_has_expected_attributes(self):
         config = get_config(self.argv_tp6_google_heavy)
         test_config = config['tests'][0]
 
         assert test_config['name'] == 'tp6_google_heavy'
         assert test_config['tpcycles'] == 1
         assert test_config['tppagecycles'] == 25
         assert test_config['gecko_profile_interval'] == 1
         assert test_config['gecko_profile_entries'] == 2000000
         assert test_config['filters'] is not None
         assert test_config['unit'] == 'ms'
         assert test_config['lower_is_better'] is True
-        assert test_config['fnbpaint'] is True
+        assert test_config['fnbpaint'] is False
         assert test_config['profile'] == 'simple'
 
     def test_tp6_youtube_has_expected_attributes(self):
         config = get_config(self.argv_tp6_youtube)
         test_config = config['tests'][0]
 
         assert test_config['name'] == 'tp6_youtube'
         assert test_config['tpcycles'] == 1
--- a/testing/talos/talos/unittests/test_test.py
+++ b/testing/talos/talos/unittests/test_test.py
@@ -141,16 +141,17 @@ class TestTsBase(object):
         'gecko_profile_startup',
         'preferences',
         'xperf_counters',
         'xperf_providers',
         'xperf_user_providers',
         'xperf_stackwalk',
         'tpmozafterpaint',
         'fnbpaint',
+        'tphero',
         'profile',
         'firstpaint',
         'userready',
         'testeventmap',
         'base_vs_ref',
         'extensions',
         'filters',
         'setup',