Bug 1482149 - raptor needs the ability to set preferences from configs. r=rwood
authorJoel Maher <jmaher@mozilla.com>
Wed, 15 Aug 2018 12:43:15 +0000
changeset 486729 50b10df2deb03b43f475fc2df6985a7cbe2d6478
parent 486728 f0819f9d226d568e96b942f1ad338cebab90f088
child 486730 c340d01c2552260a7d96ec5699594e6167f7bb43
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrwood
bugs1482149
milestone63.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 1482149 - raptor needs the ability to set preferences from configs. r=rwood support adding prefs in raptor .ini files Differential Revision: https://phabricator.services.mozilla.com/D3347
testing/raptor/raptor/raptor.py
--- a/testing/raptor/raptor/raptor.py
+++ b/testing/raptor/raptor/raptor.py
@@ -120,16 +120,25 @@ class Raptor(object):
                         test['name'],
                         self.control_server.port,
                         benchmark_port)
 
         # must intall raptor addon each time because we dynamically update some content
         raptor_webext = os.path.join(webext_dir, 'raptor')
         self.log.info("installing webext %s" % raptor_webext)
         self.profile.addons.install(raptor_webext)
+
+        # add test specific preferences
+        if test.get("preferences", None) is not None:
+            if self.config['app'] == "firefox":
+                self.profile.set_preferences(json.loads(test['preferences']))
+            else:
+                self.log.info("preferences were configured for the test, \
+                              but we do not install them on non Firefox browsers.")
+
         # on firefox we can get an addon id; chrome addon actually is just cmd line arg
         if self.config['app'] == "firefox":
             webext_id = self.profile.addons.addon_details(raptor_webext)['id']
 
         # some tests require tools to playback the test pages
         if test.get('playback', None) is not None:
             self.get_playback_config(test)
             # startup the playback tool