Bug 1366355 - Expand talos tp6 suite to linux x64; r=jmaher
MozReview-Commit-ID: CXMTg3SImxz
--- a/taskcluster/ci/test/test-sets.yml
+++ b/taskcluster/ci/test/test-sets.yml
@@ -61,16 +61,18 @@ talos:
- talos-g3
- talos-g4
- talos-g5
- talos-other
- talos-svgr
- talos-tp5o
- talos-perf-reftest
- talos-perf-reftest-singletons
+ - talos-tp6
+ - talos-tp6-stylo-threads
awsy:
- awsy
awsy-stylo-disabled:
- awsy-stylo-disabled
awsy-stylo-sequential:
@@ -139,16 +141,17 @@ linux-talos-stylo-disabled:
- talos-g3-stylo-disabled
- talos-g4-stylo-disabled
- talos-g5-stylo-disabled
- talos-other-stylo-disabled
- talos-svgr-stylo-disabled
- talos-tp5o-stylo-disabled
- talos-perf-reftest-stylo-disabled
- talos-perf-reftest-singletons-stylo-disabled
+ - talos-tp6-stylo-disabled
windows-reftest-gpu:
- reftest-gpu
windows-tests:
- cppunit
- crashtest
- firefox-ui-functional-local
--- a/taskcluster/ci/test/tests.yml
+++ b/taskcluster/ci/test/tests.yml
@@ -1756,19 +1756,19 @@ talos-tp5o-stylo-disabled:
talos-tp6:
description: "Talos Tp6"
suite: talos
try-name: tp6
treeherder-symbol: tc-T(tp6)
run-on-projects:
by-test-platform:
- windows.*: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try', 'date']
+ windows.*: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try']
macosx.*: ['mozilla-beta', 'autoland', 'try']
- default: []
+ default: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try']
max-run-time: 3600
mozharness:
script: talos_script.py
no-read-buildbot-config: true
config:
by-test-platform:
macosx.*:
- talos/mac_config.py
@@ -1786,17 +1786,17 @@ talos-tp6-stylo-disabled:
suite: talos
try-name: tp6-stylo-disabled
treeherder-symbol: tc-Tsd(tp6)
virtualization: hardware
run-on-projects:
by-test-platform:
windows.*: ['mozilla-beta', 'mozilla-central', 'try']
macosx.*: ['mozilla-beta', 'mozilla-central', 'try']
- default: []
+ default: ['mozilla-beta', 'mozilla-central', 'try']
max-run-time: 3600
mozharness:
script: talos_script.py
no-read-buildbot-config: true
config:
by-test-platform:
macosx.*:
- talos/mac_config.py
@@ -1812,17 +1812,17 @@ talos-tp6-stylo-threads:
suite: talos
try-name: tp6-stylo-threads
treeherder-symbol: tc-Tss(tp6)
virtualization: hardware
run-on-projects:
by-test-platform:
windows.*: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try']
macosx.*: ['mozilla-beta', 'autoland', 'try']
- default: []
+ default: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try']
max-run-time: 3600
mozharness:
script: talos_script.py
no-read-buildbot-config: true
config:
by-test-platform:
macosx.*:
- talos/mac_config.py
@@ -1835,17 +1835,17 @@ talos-tp6-stylo-threads:
talos-xperf:
description: "Talos xperf"
suite: talos
try-name: xperf
treeherder-symbol: tc-T(x)
run-on-projects:
by-test-platform:
- windows7-32.*: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try', 'date']
+ windows7-32.*: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try']
default: []
max-run-time: 3600
mozharness:
script: talos_script.py
no-read-buildbot-config: true
config:
by-test-platform:
macosx.*:
--- a/testing/mozharness/mozharness/mozilla/testing/talos.py
+++ b/testing/mozharness/mozharness/mozilla/testing/talos.py
@@ -412,22 +412,19 @@ class Talos(TestingMixin, MercurialScrip
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
- # tp6 is supported in production only on win and macosx
os_name = self.platform_name()
- if 'win' not in os_name and os_name != 'macosx':
- self.fatal("Aborting: this test is not supported on this platform.")
- # on windows we need to install a pytyon 3 virtual env; on macosx we
+ # on windows we need to install a pytyon 3 virtual env; on macosx and linux we
# use a mitmdump pre-built binary that doesn't need an external python 3
if 'win' in os_name:
# setup python 3.x virtualenv
self.setup_py3_virtualenv()
# install mitmproxy
self.install_mitmproxy()
@@ -452,26 +449,30 @@ class Talos(TestingMixin, MercurialScrip
def install_mitmproxy(self):
"""Install the mitmproxy tool into the Python 3.x env"""
if 'win' in self.platform_name():
self.info("Installing mitmproxy")
self.py3_install_modules(modules=['mitmproxy'])
self.mitmdump = os.path.join(self.py3_path_to_executables(), 'mitmdump')
else:
- # on macosx we use a prebuilt mitmproxy release binary
+ # on macosx and linux64 we use a prebuilt mitmproxy release binary
mitmproxy_path = os.path.join(self.talos_path, 'talos', 'mitmproxy')
self.mitmdump = os.path.join(mitmproxy_path, 'mitmdump')
if not os.path.exists(self.mitmdump):
# download the mitmproxy release binary; will be overridden by the --no-download
if '--no-download' not in self.config['talos_extra_options']:
- self.query_mitmproxy_rel_bin('osx')
+ if 'osx' in self.platform_name():
+ _platform = 'osx'
+ else:
+ _platform = 'linux64'
+ self.query_mitmproxy_rel_bin(_platform)
if self.mitmproxy_rel_bin is None:
self.fatal("Aborting: mitmproxy_release_bin_osx not found in talos.json")
- self.download_mitmproxy_binary('osx')
+ self.download_mitmproxy_binary(_platform)
else:
self.info("Not downloading mitmproxy rel binary because no-download was specified")
self.info('The mitmdump macosx binary is found at: %s' % self.mitmdump)
self.run_command([self.mitmdump, '--version'], env=self.query_env())
def query_mitmproxy_rel_bin(self, platform):
"""Mitmproxy requires external playback archives to be downloaded and extracted"""
if self.mitmproxy_rel_bin:
@@ -482,25 +483,28 @@ class Talos(TestingMixin, MercurialScrip
return self.mitmproxy_rel_bin
def download_mitmproxy_binary(self, platform):
"""Download the mitmproxy release binary from tooltool"""
self.info("Downloading the mitmproxy release binary using tooltool")
dest = os.path.join(self.talos_path, 'talos', 'mitmproxy')
_manifest = "mitmproxy-rel-bin-%s.manifest" % platform
manifest_file = os.path.join(self.talos_path, 'talos', 'mitmproxy', _manifest)
- self.tooltool_fetch(
- manifest_file,
- output_dir=dest,
- cache=self.config.get('tooltool_cache')
- )
- archive = os.path.join(dest, self.mitmproxy_rel_bin)
- tar = self.query_exe('tar')
- unzip_cmd = [tar, '-xvzf', archive, '-C', dest]
- self.run_command(unzip_cmd, halt_on_failure=True)
+
+ if platform in ['osx', 'linux64']:
+ self.tooltool_fetch(
+ manifest_file,
+ output_dir=dest,
+ cache=self.config.get('tooltool_cache')
+ )
+
+ archive = os.path.join(dest, self.mitmproxy_rel_bin)
+ tar = self.query_exe('tar')
+ unzip_cmd = [tar, '-xvzf', archive, '-C', dest]
+ self.run_command(unzip_cmd, halt_on_failure=True)
def query_mitmproxy_recording_set(self):
"""Mitmproxy requires external playback archives to be downloaded and extracted"""
if self.mitmproxy_recording_set:
return self.mitmproxy_recording_set
if self.query_talos_json_config() and self.suite is not None:
self.mitmproxy_recording_set = self.talos_json_config['suites'][self.suite].get('mitmproxy_recording_set', False)
return self.mitmproxy_recording_set
--- a/testing/talos/talos.json
+++ b/testing/talos/talos.json
@@ -107,37 +107,40 @@
"--disable-stylo",
"--xperf_path",
"\"c:/Program Files/Microsoft Windows Performance Toolkit/xperf.exe\""
]
},
"tp6-e10s": {
"tests": ["tp6_google", "tp6_youtube", "tp6_amazon", "tp6_facebook"],
"mitmproxy_release_bin_osx": "mitmproxy-2.0.2-osx.tar.gz",
+ "mitmproxy_release_bin_linux64": "mitmproxy-2.0.2-linux.tar.gz",
"mitmproxy_recording_set": "mitmproxy-recording-set-win10.zip",
"talos_options": [
"--mitmproxy",
"mitmproxy-recording-google.mp mitmproxy-recording-youtube.mp mitmproxy-recording-amazon.mp mitmproxy-recording-facebook.mp",
"--firstNonBlankPaint"
]
},
"tp6-stylo-disabled-e10s": {
"tests": ["tp6_google", "tp6_youtube", "tp6_amazon", "tp6_facebook"],
"mitmproxy_release_bin_osx": "mitmproxy-2.0.2-osx.tar.gz",
+ "mitmproxy_release_bin_linux64": "mitmproxy-2.0.2-linux.tar.gz",
"mitmproxy_recording_set": "mitmproxy-recording-set-win10.zip",
"talos_options": [
"--disable-stylo",
"--mitmproxy",
"mitmproxy-recording-google.mp mitmproxy-recording-youtube.mp mitmproxy-recording-amazon.mp mitmproxy-recording-facebook.mp",
"--firstNonBlankPaint"
]
},
"tp6-stylo-threads-e10s": {
"tests": ["tp6_google", "tp6_youtube", "tp6_amazon", "tp6_facebook"],
"mitmproxy_release_bin_osx": "mitmproxy-2.0.2-osx.tar.gz",
+ "mitmproxy_release_bin_linux64": "mitmproxy-2.0.2-linux.tar.gz",
"mitmproxy_recording_set": "mitmproxy-recording-set-win10.zip",
"talos_options": [
"--stylo-threads=1",
"--mitmproxy",
"mitmproxy-recording-google.mp mitmproxy-recording-youtube.mp mitmproxy-recording-amazon.mp mitmproxy-recording-facebook.mp",
"--firstNonBlankPaint"
]
}
new file mode 100644
--- /dev/null
+++ b/testing/talos/talos/mitmproxy/mitmproxy-rel-bin-linux64.manifest
@@ -0,0 +1,9 @@
+[
+ {
+ "filename": "mitmproxy-2.0.2-linux.tar.gz",
+ "size": 48997542,
+ "digest": "b032e04b8763206a19f80b78062efa59dc901ad32fd8d6cf2d20e22744711352da61e75d93a0d93d645179153534f72a154f73432837db415c9b0cd9d981f012",
+ "algorithm": "sha512",
+ "unpack": false
+ }
+]
--- a/testing/talos/talos/mitmproxy/mitmproxy.py
+++ b/testing/talos/talos/mitmproxy/mitmproxy.py
@@ -127,23 +127,20 @@ def start_mitmproxy_playback(mitmdump_pa
# this part is platform-specific
if mozinfo.os == 'win':
param2 = '""' + param.replace('\\', '\\\\\\') + ' ' + \
' '.join(mitmproxy_recordings).replace('\\', '\\\\\\') + '""'
sys.path.insert(1, mitmdump_path)
# mitmproxy needs some DLL's that are a part of Firefox itself, so add to path
env["PATH"] = os.path.dirname(browser_path) + ";" + env["PATH"]
- elif mozinfo.os == 'mac':
+ else:
+ # mac and linux
param2 = param + ' ' + ' '.join(mitmproxy_recordings)
env["PATH"] = os.path.dirname(browser_path)
- else:
- # TODO: support other platforms, Bug 1366355
- LOG.error('Aborting: talos mitmproxy is currently only supported on Windows and Mac')
- sys.exit()
command = [mitmdump_path, '-k', '-s', param2]
LOG.info("Starting mitmproxy playback using env path: %s" % env["PATH"])
LOG.info("Starting mitmproxy playback using command: %s" % ' '.join(command))
# to turn off mitmproxy log output, use these params for Popen:
# Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
mitmproxy_proc = subprocess.Popen(command, env=env)
@@ -155,20 +152,20 @@ def start_mitmproxy_playback(mitmdump_pa
# cannot continue as we won't be able to playback the pages
LOG.error('Aborting: mitmproxy playback process failed to start, poll returned: %s' % data)
sys.exit()
def stop_mitmproxy_playback(mitmproxy_proc):
"""Stop the mitproxy server playback"""
LOG.info("Stopping mitmproxy playback, klling process %d" % mitmproxy_proc.pid)
- if mozinfo.os == 'mac':
+ if mozinfo.os == 'win':
+ mitmproxy_proc.kill()
+ else:
mitmproxy_proc.terminate()
- else:
- mitmproxy_proc.kill()
time.sleep(10)
if mitmproxy_proc.pid in psutil.pids():
# I *think* we can still continue, as process will be automatically
# killed anyway when mozharness is done (?) if not, we won't be able
# to startup mitmxproy next time if it is already running
LOG.error("Failed to kill the mitmproxy playback process")
else:
LOG.info("Successfully killed the mitmproxy playback process")