Bug 1498338 [wpt PR 13468] - Switch to GroupingFormatter by default for wpt run., a=testonly
authorjgraham <james@hoppipolla.co.uk>
Tue, 16 Oct 2018 09:58:33 +0000
changeset 500227 a014420e5071871c7537c3b4fe56b555702552ce
parent 500226 33acf346b32fa693369fded259061dd8d130798d
child 500228 2d2ea440e7749a33485f0c3d4a43c21609a5d087
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1498338, 13468
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 1498338 [wpt PR 13468] - Switch to GroupingFormatter by default for wpt run., a=testonly Automatic update from web-platform-testsSwitch to GroupingFormatter by default for wpt run. (#13468) This provides very low-verbosity output, just recording the current test, any unexpected failures, and a summary of results at the end. It's not very suitable for CI where log messages and timestamps are desirable, but may be the best choice for local testruns. -- wpt-commits: c6f9238024b1a1f320132cd61e79e7e8dbce3510 wpt-pr: 13468
testing/web-platform/tests/tools/ci/ci_wptrunner_infrastructure.sh
testing/web-platform/tests/tools/wpt/run.py
--- a/testing/web-platform/tests/tools/ci/ci_wptrunner_infrastructure.sh
+++ b/testing/web-platform/tests/tools/ci/ci_wptrunner_infrastructure.sh
@@ -9,17 +9,17 @@ source tools/ci/lib.sh
 
 test_infrastructure() {
     local ARGS="";
     if [ $PRODUCT == "firefox" ]; then
         ARGS="--install-browser"
     else
         ARGS=$1
     fi
-    ./wpt run --yes --manifest ~/meta/MANIFEST.json --metadata infrastructure/metadata/ --install-fonts $ARGS $PRODUCT infrastructure/
+    ./wpt run --log-tbpl - --yes --manifest ~/meta/MANIFEST.json --metadata infrastructure/metadata/ --install-fonts $ARGS $PRODUCT infrastructure/
 }
 
 main() {
     PRODUCTS=( "firefox" "chrome" )
     for PRODUCT in "${PRODUCTS[@]}"; do
         if [ "$PRODUCT" != "firefox" ]; then
             # Firefox is expected to work using pref settings for DNS
             # Don't adjust the hostnames in that case to ensure this keeps working
--- a/testing/web-platform/tests/tools/wpt/run.py
+++ b/testing/web-platform/tests/tools/wpt/run.py
@@ -456,26 +456,32 @@ product_setup = {
     "sauce": Sauce,
     "opera": Opera,
     "webkit": WebKit,
 }
 
 
 def setup_wptrunner(venv, prompt=True, install_browser=False, **kwargs):
     from wptrunner import wptrunner, wptcommandline
+    import mozlog
 
     global logger
 
     kwargs = utils.Kwargs(kwargs.iteritems())
 
     product_parts = kwargs["product"].split(":")
     kwargs["product"] = product_parts[0]
     sub_product = product_parts[1:]
 
-    wptrunner.setup_logging(kwargs, {"mach": sys.stdout})
+    # Use the grouped formatter by default where mozlog 3.9+ is installed
+    if hasattr(mozlog.formatters, "GroupingFormatter"):
+        default_formatter = "grouped"
+    else:
+        default_formatter = "mach"
+    wptrunner.setup_logging(kwargs, {default_formatter: sys.stdout})
     logger = wptrunner.logger
 
     check_environ(kwargs["product"])
     args_general(kwargs)
 
     if kwargs["product"] not in product_setup:
         raise WptrunError("Unsupported product %s" % kwargs["product"])