Bug 1321048 - add talos-test option to not download tp5 pageset; r?jmaher draft
authorRob Wood <rwood@mozilla.com>
Thu, 01 Dec 2016 11:20:22 -0500
changeset 446623 b1bc8091eb177a22661ac9851776f493b1e8af0d
parent 446527 3853c539a1b7c803f1075d2c3ecefbdd314af1d8
child 538817 7ce8f852a18604ccecd1c797a7780c2da3f66463
push id37828
push userrwood@mozilla.com
push dateThu, 01 Dec 2016 16:20:42 +0000
reviewersjmaher
bugs1321048
milestone53.0a1
Bug 1321048 - add talos-test option to not download tp5 pageset; r?jmaher MozReview-Commit-ID: KtpbABSg40a
testing/mozharness/mozharness/mozilla/testing/talos.py
testing/talos/talos/cmdline.py
--- a/testing/mozharness/mozharness/mozilla/testing/talos.py
+++ b/testing/mozharness/mozharness/mozilla/testing/talos.py
@@ -321,30 +321,34 @@ class Talos(TestingMixin, MercurialScrip
                     self.validate_suite()
                 else:
                     self.fatal("Suite name not provided")
         else:
             # talos initiated in production via mozharness
             self.suite = self.config['suite']
 
         # now that have the suite name, check if pageset is required, if so download it
+        # the --no-download option will override this
         if self.query_pagesets_name():
-            self.info("Downloading pageset with tooltool...")
-            self.src_talos_webdir = os.path.join(self.talos_path, 'talos')
-            src_talos_pageset = os.path.join(self.src_talos_webdir, 'tests')
-            manifest_file = os.path.join(self.talos_path, 'tp5n-pageset.manifest')
-            self.tooltool_fetch(
-                manifest_file,
-                output_dir=src_talos_pageset,
-                cache=self.config.get('tooltool_cache')
-            )
-            archive = os.path.join(src_talos_pageset, self.pagesets_name)
-            unzip = self.query_exe('unzip')
-            unzip_cmd = [unzip, '-q', '-o', archive, '-d', src_talos_pageset]
-            self.run_command(unzip_cmd, halt_on_failure=True)
+            if '--no-download' not in self.config['talos_extra_options']:
+                self.info("Downloading pageset with tooltool...")
+                self.src_talos_webdir = os.path.join(self.talos_path, 'talos')
+                src_talos_pageset = os.path.join(self.src_talos_webdir, 'tests')
+                manifest_file = os.path.join(self.talos_path, 'tp5n-pageset.manifest')
+                self.tooltool_fetch(
+                    manifest_file,
+                    output_dir=src_talos_pageset,
+                    cache=self.config.get('tooltool_cache')
+                )
+                archive = os.path.join(src_talos_pageset, self.pagesets_name)
+                unzip = self.query_exe('unzip')
+                unzip_cmd = [unzip, '-q', '-o', archive, '-d', src_talos_pageset]
+                self.run_command(unzip_cmd, halt_on_failure=True)
+            else:
+                self.info("Not downloading pageset because the no-download option was specified")
 
     # Action methods. {{{1
     # clobber defined in BaseScript
     # read_buildbot_config defined in BuildbotMixin
 
     def download_and_extract(self, extract_dirs=None, suite_categories=None):
         return super(Talos, self).download_and_extract(
             suite_categories=['common', 'talos']
--- a/testing/talos/talos/cmdline.py
+++ b/testing/talos/talos/cmdline.py
@@ -122,16 +122,18 @@ def create_parser(mach_interface=False):
     add_arg('--tptimeout', type=int,
             help='number of milliseconds to wait for a load event after'
                  ' calling loadURI before timing out')
     add_arg('--tppagecycles', type=int,
             help='number of pageloader cycles to run for each page in'
                  ' the manifest')
     add_arg('--tpdelay', type=int,
             help="length of the pageloader delay")
+    add_arg('--no-download', action="store_true", dest="no_download",
+            help="Do not download the talos test pagesets")
     add_arg('--sourcestamp',
             help='Specify the hg revision or sourcestamp for the changeset'
                  ' we are testing.  This will use the value found in'
                  ' application.ini if it is not specified.')
     add_arg('--repository',
             help='Specify the url for the repository we are testing. '
                  'This will use the value found in application.ini if'
                  ' it is not specified.')