Bug 1497962 - Ensure extra_prefs is passed as a list r=jgraham
authorWes Kocher <wkocher@mozilla.com>
Thu, 11 Oct 2018 09:05:41 +0000
changeset 496421 43470b75b0d4c3f53ac5f8f50f1789873e50430b
parent 496420 e18103445f9e44d015e300cf9249f4ffa994ccc8
child 496422 57d97b765e4913a0abecea6444eb4e9bd43025cd
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1497962
milestone64.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 1497962 - Ensure extra_prefs is passed as a list r=jgraham Differential Revision: https://phabricator.services.mozilla.com/D8264
testing/web-platform/tests/tools/wptrunner/wptrunner/wptcommandline.py
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/wptcommandline.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/wptcommandline.py
@@ -497,16 +497,19 @@ def check_args(kwargs):
     if kwargs["ssl_type"] != "none" and kwargs["product"] == "firefox" and kwargs["certutil_binary"]:
         path = exe_path(kwargs["certutil_binary"])
         if path is None:
             print >> sys.stderr, "certutil-binary argument missing or not a valid executable"
             sys.exit(1)
         kwargs["certutil_binary"] = path
 
     if kwargs['extra_prefs']:
+        # If a single pref is passed in as a string, make it a list
+        if type(kwargs['extra_prefs']) in (str, unicode):
+            kwargs['extra_prefs'] = [kwargs['extra_prefs']]
         missing = any('=' not in prefarg for prefarg in kwargs['extra_prefs'])
         if missing:
             print >> sys.stderr, "Preferences via --setpref must be in key=value format"
             sys.exit(1)
         kwargs['extra_prefs'] = [tuple(prefarg.split('=', 1)) for prefarg in
                                  kwargs['extra_prefs']]
 
     if kwargs["reftest_internal"] is None: