Bug 1370203 - Check hosts are configured with |mach wpt|, r=farre
authorJames Graham <james@hoppipolla.co.uk>
Mon, 05 Jun 2017 13:29:47 +0100
changeset 410467 ae7d51d0a455bda907d599f7f127c135ad2b3dff
parent 410466 0ec65d58e0ae4baf5e7ba1c47ea7b56bd03d2272
child 410468 60d3fb7b6810db236778a36f77e277e2c497eb43
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfarre
bugs1370203
milestone55.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 1370203 - Check hosts are configured with |mach wpt|, r=farre For Chrome and Edge we don't have any way to set the DNS configuration to include web-platform.test, so we need to error if this isn't already set. MozReview-Commit-ID: BHRsTiuV28x
testing/web-platform/mach_commands.py
--- a/testing/web-platform/mach_commands.py
+++ b/testing/web-platform/mach_commands.py
@@ -70,25 +70,33 @@ class WebPlatformTestsRunner(MozbuildObj
     def setup_kwargs_wptrun(self, kwargs):
         from wptrunner import wptcommandline
         here = os.path.join(self.topsrcdir, 'testing', 'web-platform')
 
         sys.path.insert(0, os.path.join(here, "tests", "tools"))
 
         import wptrun
 
+        product = kwargs["product"]
+
         setup_func = {
             "chrome": wptrun.setup_chrome,
             "edge": wptrun.setup_edge,
             "servo": wptrun.setup_servo,
-        }[kwargs["product"]]
+        }[product]
+
+        try:
+            wptrun.check_environ(product)
 
-        setup_func(wptrun.virtualenv.Virtualenv(self.virtualenv_manager.virtualenv_root),
-                   kwargs,
-                   True)
+            setup_func(wptrun.virtualenv.Virtualenv(self.virtualenv_manager.virtualenv_root),
+                       kwargs,
+                       True)
+        except wptrun.WptrunError as e:
+            print(e.message, file=sys.stderr)
+            sys.exit(1)
 
         kwargs["tests_root"] = os.path.join(here, "tests")
 
         if kwargs["metadata_root"] is None:
             metadir = os.path.join(here, "products", kwargs["product"])
             if not os.path.exists(metadir):
                 os.makedirs(metadir)
             kwargs["metadata_root"] = metadir