Bug 1321048 - add talos-test option to not download tp5 pageset; r=jmaher
authorRob Wood <rwood@mozilla.com>
Thu, 01 Dec 2016 11:20:22 -0500
changeset 325040 884d81d5c32bc684c789660ab9072771f8be40fc
parent 325039 a3d8baec7db04cb05102fee3fd6ecb8bd6cd5dd3
child 325041 5a083b4e11bfbca14c3951c2a4a791b168849d8b
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +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.')