Bug 1415168 - Fix 404 error when running talos speedometer locally; r=igoldan

MozReview-Commit-ID: CTpAfFlE4oG

--HG--
extra : rebase_source : 8a5211593feb40ee16623992ae95cabefede67f8
This commit is contained in:
Rob Wood 2017-11-28 15:35:44 -05:00
parent 29f504c683
commit 235e31cd3f
2 changed files with 25 additions and 0 deletions

View File

@ -145,6 +145,11 @@ GPATH
^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

View File

@ -417,6 +417,26 @@ class Talos(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin,
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.