Bug 1415168 - Fix 404 error when running talos speedometer locally; r=igoldan
authorRob Wood <rwood@mozilla.com>
Tue, 28 Nov 2017 15:35:44 -0500
changeset 394258 30f9238d83d1fbfb4c300da23ceea003ca066a64
parent 394257 18717bbecba151490eb73a2183f81e1801d50fbe
child 394259 6b3c508ccd771b8e529679a7680e7ba03d40ffca
push id32997
push usershindli@mozilla.com
push dateThu, 30 Nov 2017 09:58:19 +0000
treeherdermozilla-central@1762ac4166c9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersigoldan
bugs1415168
milestone59.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 1415168 - Fix 404 error when running talos speedometer locally; r=igoldan MozReview-Commit-ID: CTpAfFlE4oG
.hgignore
testing/mozharness/mozharness/mozilla/testing/talos.py
--- a/.hgignore
+++ b/.hgignore
@@ -140,16 +140,21 @@ GPATH
 ^testing/talos/talos/tests/tp5n
 ^testing/talos/talos/tests/devtools/damp.manifest.develop
 ^talos-venv
 ^py3venv
 ^testing/talos/talos/mitmproxy/mitmdump
 ^testing/talos/talos/mitmproxy/mitmproxy
 ^testing/talos/talos/mitmproxy/mitmweb
 
+# Ignore talos speedometer files; source is copied from in-tree /third_party
+# into testing/talos/talos/tests/webkit/PerformanceTests/Speedometer when
+# talos speedometer test is run locally
+^testing/talos/talos/tests/webkit/PerformanceTests/Speedometer
+
 # Ignore toolchains.json created by tooltool.
 ^toolchains\.json
 
 # Ignore files created when running a reftest.
 ^lextab.py$
 
 # tup database
 ^\.tup
--- a/testing/mozharness/mozharness/mozilla/testing/talos.py
+++ b/testing/mozharness/mozharness/mozilla/testing/talos.py
@@ -412,16 +412,36 @@ class Talos(TestingMixin, MercurialScrip
                 )
                 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")
 
+        # if running speedometer locally, need to copy speedometer source into talos/tests
+        if self.config.get('run_local') and 'speedometer' in self.suite:
+            self.get_speedometer_source()
+
+    def get_speedometer_source(self):
+        # in production the build system auto copies speedometer source into place;
+        # but when run locally we need to do this manually, so that talos can find it
+        src = os.path.join(self.repo_path, 'third_party', 'webkit',
+                                 'PerformanceTests', 'Speedometer')
+        dest = os.path.join(self.talos_path, 'talos', 'tests', 'webkit',
+                                      'PerformanceTests', 'Speedometer')
+        if not os.path.exists(dest):
+            self.info("Copying speedometer source from %s to %s" % (src, dest))
+            try:
+                shutil.copytree(src, dest)
+            except:
+                self.critical("Error copying speedometer source from %s to %s" % (src, dest))
+        else:
+            self.info("Speedometer source already found at %s" % dest)
+
     def setup_mitmproxy(self):
         """Some talos tests require the use of mitmproxy to playback the pages,
         set it up here.
         """
         if not self.query_mitmproxy_recording_set():
             self.info("Skipping: mitmproxy is not required")
             return