Bug 1528236 - [raptor] Update profile building code to align with mochitests. r=perftest-reviewers,rwood
authorHenrik Skupin <mail@hskupin.info>
Tue, 14 May 2019 19:32:13 +0000
changeset 473829 ed679c1e266d2beb10cd491f710fb6021e37c158
parent 473828 09eea8c87cd551a490ac92ebdc99cbb2041f07ee
child 473830 90a51dbd6ee1126091052281424dfd8fb46fb119
push id36017
push userrgurzau@mozilla.com
push dateWed, 15 May 2019 09:25:56 +0000
treeherdermozilla-central@76bbedc1ec1a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersperftest-reviewers, rwood
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] Update profile building code to align with mochitests. r=perftest-reviewers,rwood Differential Revision: https://phabricator.services.mozilla.com/D29332
testing/raptor/raptor/raptor.py
--- a/testing/raptor/raptor/raptor.py
+++ b/testing/raptor/raptor/raptor.py
@@ -134,17 +134,17 @@ class Raptor(object):
             self.log.info("debug-mode enabled, reducing post-browser startup pause to %d ms"
                           % self.post_startup_delay)
 
         self.log.info("main raptor init, config is: %s" % str(self.config))
 
         # create results holder
         self.results_handler = RaptorResultsHandler()
 
-        self.create_browser_profile()
+        self.build_browser_profile()
         self.start_control_server()
 
     @property
     def profile_data_dir(self):
         if 'MOZ_DEVELOPER_REPO_DIR' in os.environ:
             return os.path.join(os.environ['MOZ_DEVELOPER_REPO_DIR'], 'testing', 'profiles')
         if build:
             return os.path.join(build.topsrcdir, 'testing', 'profiles')
@@ -237,25 +237,25 @@ class Raptor(object):
             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.")
 
-    def create_browser_profile(self):
+    def build_browser_profile(self):
         self.profile = create_profile(self.profile_class)
 
-        # Merge in base profiles
+        # 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']
 
-        for name in base_profiles:
-            path = os.path.join(self.profile_data_dir, name)
+        for profile in base_profiles:
+            path = os.path.join(self.profile_data_dir, profile)
             self.log.info("Merging profile: {}".format(path))
             self.profile.merge(path)
 
         # add profile dir to our config
         self.config['local_profile_dir'] = self.profile.profile
 
     def start_control_server(self):
         self.control_server = RaptorControlServer(self.results_handler, self.debug_mode)
@@ -499,17 +499,17 @@ class RaptorDesktop(Raptor):
                     self.start_playback(test)
 
                 if self.config['host'] not in ('localhost', '127.0.0.1'):
                     self.delete_proxy_settings_from_profile()
 
             else:
                 # initial browser profile was already created before run_test was called;
                 # now additional browser cycles we want to create a new one each time
-                self.create_browser_profile()
+                self.build_browser_profile()
 
                 self.run_test_setup(test)
 
             # now start the browser/app under test
             self.launch_desktop_browser(test)
 
             # set our control server flag to indicate we are running the browser/app
             self.control_server._finished = False
@@ -1033,17 +1033,17 @@ class RaptorAndroid(Raptor):
                 # double-check to ensure app has been shutdown
                 self.device.stop_application(self.config['binary'])
 
                 # clear the android app data before the next app startup
                 self.clear_app_data()
 
                 # initial browser profile was already created before run_test was called;
                 # now additional browser cycles we want to create a new one each time
-                self.create_browser_profile()
+                self.build_browser_profile()
 
                 if test.get('playback') is not None:
                     # get cert db from previous cycle profile and copy into new clean profile
                     # this saves us from having to start playback again / recreate cert db etc.
                     self.log.info("copying existing ssl cert db into new browser profile")
                     self.copy_cert_db(local_cert_db_dir, self.config['local_profile_dir'])
 
                 self.run_test_setup(test)