Bug 1340267 - Rename SPS to Gecko for Talos tests run from mozharness. r?jmaher draft
authorMike Conley <mconley@mozilla.com>
Thu, 16 Feb 2017 16:25:13 -0500
changeset 486284 f190dd7447698251a7c7822cb6692dc9aff92ae9
parent 486283 53e4dc0bcbfc24b8e5b7bad4496225bd7e9b3a99
child 486285 a9214c53189afe1ee7400392fb159341fc6fb4ab
push id45950
push usermconley@mozilla.com
push dateFri, 17 Feb 2017 19:54:39 +0000
reviewersjmaher
bugs1340267
milestone54.0a1
Bug 1340267 - Rename SPS to Gecko for Talos tests run from mozharness. r?jmaher MozReview-Commit-ID: B8x8Oe2rk4D
testing/mozharness/mozharness/mozilla/testing/talos.py
--- a/testing/mozharness/mozharness/mozilla/testing/talos.py
+++ b/testing/mozharness/mozharness/mozilla/testing/talos.py
@@ -119,24 +119,24 @@ class Talos(TestingMixin, MercurialScrip
           "help": "Testing 32 or 64 (for talos json plugins)"
           }],
         [["--add-option"],
          {"action": "extend",
           "dest": "talos_extra_options",
           "default": None,
           "help": "extra options to talos"
           }],
-        [["--spsProfile"], {
-            "dest": "sps_profile",
+        [["--geckoProfile"], {
+            "dest": "gecko_profile",
             "action": "store_true",
             "default": False,
             "help": "Whether or not to profile the test run and save the profile results"
         }],
-        [["--spsProfileInterval"], {
-            "dest": "sps_profile_interval",
+        [["--geckoProfileInterval"], {
+            "dest": "gecko_profile_interval",
             "type": "int",
             "default": 0,
             "help": "The interval between samples taken by the profiler (milliseconds)"
         }],
     ] + testing_config_options + copy.deepcopy(blobupload_config_options)
 
     def __init__(self, **kwargs):
         kwargs.setdefault('config_options', self.config_options)
@@ -161,56 +161,56 @@ class Talos(TestingMixin, MercurialScrip
         self.workdir = self.query_abs_dirs()['abs_work_dir']  # convenience
 
         self.run_local = self.config.get('run_local')
         self.installer_url = self.config.get("installer_url")
         self.talos_json_url = self.config.get("talos_json_url")
         self.talos_json = self.config.get("talos_json")
         self.talos_json_config = self.config.get("talos_json_config")
         self.tests = None
-        self.sps_profile = self.config.get('sps_profile')
-        self.sps_profile_interval = self.config.get('sps_profile_interval')
+        self.gecko_profile = self.config.get('gecko_profile')
+        self.gecko_profile_interval = self.config.get('gecko_profile_interval')
         self.pagesets_name = None
 
     # We accept some configuration options from the try commit message in the format mozharness: <options>
     # Example try commit message:
-    #   mozharness: --spsProfile try: <stuff>
-    def query_sps_profile_options(self):
-        sps_results = []
+    #   mozharness: --geckoProfile try: <stuff>
+    def query_gecko_profile_options(self):
+        gecko_results = []
         if self.buildbot_config:
             # this is inside automation
-            # now let's see if we added spsProfile specs in the commit message
+            # now let's see if we added GeckoProfile specs in the commit message
             try:
                 junk, junk, opts = self.buildbot_config['sourcestamp']['changes'][-1]['comments'].partition('mozharness:')
             except IndexError:
                 # when we don't have comments on changes (bug 1255187)
                 opts = None
 
             if opts:
               # In the case of a multi-line commit message, only examine
               # the first line for mozharness options
               opts = opts.split('\n')[0]
               opts = re.sub(r'\w+:.*', '', opts).strip().split(' ')
-              if "--spsProfile" in opts:
+              if "--geckoProfile" in opts:
                   # overwrite whatever was set here.
-                  self.sps_profile = True
+                  self.gecko_profile = True
               try:
-                  idx = opts.index('--spsProfileInterval')
+                  idx = opts.index('--geckoProfileInterval')
                   if len(opts) > idx + 1:
-                      self.sps_profile_interval = opts[idx + 1]
+                      self.gecko_profile_interval = opts[idx + 1]
               except ValueError:
                   pass
-        # finally, if sps_profile is set, we add that to the talos options
-        if self.sps_profile:
-            sps_results.append('--spsProfile')
-            if self.sps_profile_interval:
-                sps_results.extend(
-                    ['--spsProfileInterval', str(self.sps_profile_interval)]
+        # finally, if gecko_profile is set, we add that to the talos options
+        if self.gecko_profile:
+            gecko_results.append('--geckoProfile')
+            if self.gecko_profile_interval:
+                gecko_results.extend(
+                    ['--geckoProfileInterval', str(self.gecko_profile_interval)]
                 )
-        return sps_results
+        return gecko_results
 
     def query_abs_dirs(self):
         if self.abs_dirs:
             return self.abs_dirs
         abs_dirs = super(Talos, self).query_abs_dirs()
         abs_dirs['abs_blob_upload_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'blobber_upload_dir')
         self.abs_dirs = abs_dirs
         return self.abs_dirs
@@ -288,17 +288,17 @@ class Talos(TestingMixin, MercurialScrip
         # talos expects tests to be in the format (e.g.) 'ts:tp5:tsvg'
         tests = kw_options.get('activeTests')
         if tests and not isinstance(tests, basestring):
             tests = ':'.join(tests)  # Talos expects this format
             kw_options['activeTests'] = tests
         for key, value in kw_options.items():
             options.extend(['--%s' % key, value])
         # configure profiling options
-        options.extend(self.query_sps_profile_options())
+        options.extend(self.query_gecko_profile_options())
         # extra arguments
         if args is not None:
             options += args
         if 'talos_extra_options' in self.config:
             options += self.config['talos_extra_options']
         return options
 
     def populate_webroot(self):
@@ -480,17 +480,17 @@ class Talos(TestingMixin, MercurialScrip
                 log_level = WARNING
                 tbpl_level = TBPL_WARNING
             if self.return_code == 4:
                 log_level = WARNING
                 tbpl_level = TBPL_RETRY
 
             parser.update_worst_log_and_tbpl_levels(log_level, tbpl_level)
         else:
-            if not self.sps_profile:
+            if not self.gecko_profile:
                 self._validate_treeherder_data(parser)
                 if not self.run_local:
                     # copy results to upload dir so they are included as an artifact
                     dest = os.path.join(env['MOZ_UPLOAD_DIR'], 'perfherder-data.json')
                     self._artifact_perf_data(dest)
 
         self.buildbot_status(parser.worst_tbpl_status,
                              level=parser.worst_log_level)