Bug 1528236 - [raptor] Use opt-out mechanism for setting test specific preferences. r=perftest-reviewers,stephendonner
authorHenrik Skupin <mail@hskupin.info>
Tue, 14 May 2019 19:32:27 +0000
changeset 532645 0d0a4250902b027df34308763f167bc84f3be8d9
parent 532644 d12eb6d840fc2dbbf0746b3dbbbd0ca34352ca75
child 532646 e3640e306c198fecaeb1725ad9810d0d062c82e1
push id11270
push userrgurzau@mozilla.com
push dateWed, 15 May 2019 15:07:19 +0000
treeherdermozilla-beta@571bc76da583 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersperftest-reviewers, stephendonner
bugs1528236
milestone68.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 1528236 - [raptor] Use opt-out mechanism for setting test specific preferences. r=perftest-reviewers,stephendonner Due to missing class abstractions for Gecko- and non-Gecko based browsers it's currently sub-optimal to define when preferences as defined by tests will be set. Given that by default we run Gecko-based applications other browsers should opt-out from setting test preferences. Differential Revision: https://phabricator.services.mozilla.com/D30923
testing/raptor/raptor/raptor.py
--- a/testing/raptor/raptor/raptor.py
+++ b/testing/raptor/raptor/raptor.py
@@ -234,18 +234,18 @@ class Raptor(object):
         if self.config['gecko_profile'] is True:
             self.gecko_profiler.symbolicate()
             # clean up the temp gecko profiling folders
             self.log.info("cleaning up after gecko profiling")
             self.gecko_profiler.clean()
 
     def set_browser_test_prefs(self, raw_prefs):
         # add test specific preferences
-        self.log.info("preferences were configured for the test, however \
-                        we currently do not install them on non Firefox browsers.")
+        self.log.info("setting test-specific Firefox preferences")
+        self.profile.set_preferences(json.loads(raw_prefs))
 
     def build_browser_profile(self):
         self.profile = create_profile(self.profile_class)
 
         # Merge extra profile data from testing/profiles
         with open(os.path.join(self.profile_data_dir, 'profiles.json'), 'r') as fh:
             base_profiles = json.load(fh)['raptor']
 
@@ -595,21 +595,16 @@ class RaptorDesktopFirefox(RaptorDesktop
         # if geckoProfile is enabled, initialize it
         if self.config['gecko_profile'] is True:
             self._init_gecko_profiling(test)
             # tell the control server the gecko_profile dir; the control server will
             # receive the actual gecko profiles from the web ext and will write them
             # to disk; then profiles are picked up by gecko_profile.symbolicate
             self.control_server.gecko_profile_dir = self.gecko_profiler.gecko_profile_dir
 
-    def set_browser_test_prefs(self, raw_prefs):
-        # add test specific preferences
-        self.log.info("setting test-specific Firefox preferences")
-        self.profile.set_preferences(json.loads(raw_prefs))
-
 
 class RaptorDesktopChrome(RaptorDesktop):
 
     def setup_chrome_desktop_for_playback(self):
         # if running a pageload test on google chrome, add the cmd line options
         # to turn on the proxy and ignore security certificate errors
         # if using host localhost, 127.0.0.1.
         chrome_args = [
@@ -631,16 +626,21 @@ class RaptorDesktopChrome(RaptorDesktop)
         if self.debug_mode:
             self.runner.cmdargs.extend(['--auto-open-devtools-for-tabs'])
 
         if test.get('playback') is not None:
             self.setup_chrome_desktop_for_playback()
 
         self.start_runner_proc()
 
+    def set_browser_test_prefs(self, raw_prefs):
+        # add test-specific preferences
+        self.log.info("preferences were configured for the test, however \
+                        we currently do not install them on non-Firefox browsers.")
+
 
 class RaptorAndroid(Raptor):
 
     def __init__(self, app, binary, activity=None, intent=None, **kwargs):
         super(RaptorAndroid, self).__init__(app, binary, profile_class="firefox", **kwargs)
 
         self.config.update({
             'activity': activity,