Bug 1286900 - Inline WPT arguments into script; r?ted
4 WPT config files all contained the same config options boilerplate.
Inline it into the WPT mozharness script.
MozReview-Commit-ID: 5Lba8QeKMTA
--- a/testing/mozharness/configs/web_platform_tests/prod_config.py
+++ b/testing/mozharness/configs/web_platform_tests/prod_config.py
@@ -1,26 +1,16 @@
# ***** BEGIN LICENSE BLOCK *****
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
# ***** END LICENSE BLOCK *****
import os
config = {
- "options": [
- "--prefs-root=%(test_path)s/prefs",
- "--processes=1",
- "--config=%(test_path)s/wptrunner.ini",
- "--ca-cert-path=%(test_path)s/certs/cacert.pem",
- "--host-key-path=%(test_path)s/certs/web-platform.test.key",
- "--host-cert-path=%(test_path)s/certs/web-platform.test.pem",
- "--certutil-binary=%(test_install_path)s/bin/certutil",
- ],
-
"exes": {
'python': '/tools/buildbot/bin/python',
'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
'tooltool.py': "/tools/tooltool.py",
},
"find_links": [
"http://pypi.pvt.build.mozilla.org/pub",
--- a/testing/mozharness/configs/web_platform_tests/prod_config_windows.py
+++ b/testing/mozharness/configs/web_platform_tests/prod_config_windows.py
@@ -5,26 +5,16 @@
# ***** END LICENSE BLOCK *****
# This is a template config file for web-platform-tests test.
import os
import sys
config = {
- "options": [
- "--prefs-root=%(test_path)s/prefs",
- "--processes=1",
- "--config=%(test_path)s/wptrunner.ini",
- "--ca-cert-path=%(test_path)s/certs/cacert.pem",
- "--host-key-path=%(test_path)s/certs/web-platform.test.key",
- "--host-cert-path=%(test_path)s/certs/web-platform.test.pem",
- "--certutil-binary=%(test_install_path)s/bin/certutil",
- ],
-
"exes": {
'python': sys.executable,
'virtualenv': [sys.executable, 'c:/mozilla-build/buildbotve/virtualenv.py'],
'hg': 'c:/mozilla-build/hg/hg',
'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
'%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
'tooltool.py': [sys.executable, 'C:/mozilla-build/tooltool.py'],
},
--- a/testing/mozharness/configs/web_platform_tests/test_config.py
+++ b/testing/mozharness/configs/web_platform_tests/test_config.py
@@ -1,25 +1,15 @@
# ***** BEGIN LICENSE BLOCK *****
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
# ***** END LICENSE BLOCK *****
config = {
- "options": [
- "--prefs-root=%(test_path)s/prefs",
- "--processes=1",
- "--config=%(test_path)s/wptrunner.ini",
- "--ca-cert-path=%(test_path)s/certs/cacert.pem",
- "--host-key-path=%(test_path)s/certs/web-platform.test.key",
- "--host-cert-path=%(test_path)s/certs/web-platform.test.pem",
- "--certutil-binary=%(test_install_path)s/bin/certutil",
- ],
-
"default_actions": [
'clobber',
'download-and-extract',
'create-virtualenv',
'pull',
'install',
'run-tests',
],
--- a/testing/mozharness/configs/web_platform_tests/test_config_windows.py
+++ b/testing/mozharness/configs/web_platform_tests/test_config_windows.py
@@ -3,26 +3,16 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
# ***** END LICENSE BLOCK *****
import os
import sys
config = {
- "options": [
- "--prefs-root=%(test_path)s/prefs",
- "--processes=1",
- "--config=%(test_path)s/wptrunner.ini",
- "--ca-cert-path=%(test_path)s/certs/cacert.pem",
- "--host-key-path=%(test_path)s/certs/web-platform.test.key",
- "--host-cert-path=%(test_path)s/certs/web-platform.test.pem",
- "--certutil-binary=%(test_install_path)s/bin/certutil",
- ],
-
"exes": {
'python': sys.executable,
'virtualenv': [sys.executable, 'c:/mozilla-source/cedar/python/virtualenv/virtualenv.py'], #'c:/mozilla-build/buildbotve/virtualenv.py'],
'hg': 'c:/mozilla-build/hg/hg',
'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
'%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
},
--- a/testing/mozharness/scripts/web_platform_tests.py
+++ b/testing/mozharness/scripts/web_platform_tests.py
@@ -131,25 +131,33 @@ class WebPlatformTest(TestingMixin, Merc
cmd.append(os.path.join(dirs["abs_wpttest_dir"], run_file_name))
# Make sure that the logging directory exists
if self.mkdir_p(dirs["abs_blob_upload_dir"]) == -1:
self.fatal("Could not create blobber upload directory")
# Exit
blob_upload_dir = dirs['abs_blob_upload_dir']
+ wpt_dir = dirs['abs_wpttest_dir']
cmd.extend([
'--log-raw=-',
'--log-raw=%s' % os.path.join(blob_upload_dir, 'wpt_raw.log'),
'--log-errorsummary=%s' % os.path.join(blob_upload_dir,
'wpt_errorsummary.log'),
'--binary=%s' % self.binary_path,
'--symbols-path=%s' % self.query_symbols_url(),
'--stackwalk-binary=%s' % self.query_minidump_stackwalk(),
+ '--processes=1',
+ '--prefs-root=%s/prefs' % wpt_dir,
+ '--config=%s/wptrunner.ini' % wpt_dir,
+ '--ca-cert-path=%s/certs/cacert.pem' % wpt_dir,
+ '--host-key-path=%s/certs/web-platform.test.key' % wpt_dir,
+ '--host-cert-path=%s/certs/web-platform.test.pem' % wpt_dir,
+ '--certutil-binary=%s/bin/certutil' % dirs['abs_test_install_dir'],
])
for test_type in c.get("test_type", []):
cmd.append("--test-type=%s" % test_type)
if not c["e10s"]:
cmd.append("--disable-e10s")