Bug 1415168 - Fix 404 error when running talos speedometer locally; r?igoldan
MozReview-Commit-ID: CTpAfFlE4oG
--- 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