Command-Line Arguments

The wpt command-line application offers a number of features for interacting with WPT. The functionality is organized into “sub-commands”, and each accepts a different set of command-line arguments.

This page documents all of the available sub-commands and associated arguments.

usage: wpt [-h]
           {build-docs,test-jobs,make-hosts-file,regen-certs,update-built,tc-download,tc-decision,tc-sink-task,docker-run,docker-push,lint,manifest,manifest-download,test-paths,serve,serve-wave,run,create,update-expectations,files-changed,tests-affected,install,rev-list,install-android-emulator,start-android-emulator}
           ...

Sub-commands:

build-docs

Build documentation

wpt build-docs [-h] [--type TYPE] [--docker] [--serve [SERVE]]

Named Arguments

--type

Output type (default: html)

Default: “html”

--docker

Run inside the docs docker image

Default: False

--serve

Run a server on the specified port (default: 8000)

test-jobs

List test jobs that should run for a set of commits

wpt test-jobs [-h] [--all] [--includes [INCLUDES ...]] [revish]

Positional Arguments

revish

Commits to consider. Defaults to the commits on the current branch

Named Arguments

--all

List all jobs unconditionally.

Default: False

--includes

Jobs to check for. Return code is 0 if all jobs are found, otherwise 1

make-hosts-file

Output a hosts file to stdout

wpt make-hosts-file [-h] [address]

Positional Arguments

address

Address that hosts should point at

Default: “127.0.0.1”

regen-certs

Regenerate the WPT certificates

wpt regen-certs [-h] [--checkend-seconds CHECKEND_SECONDS] [--force]

Named Arguments

--checkend-seconds

The number of seconds the certificates must be valid for

Default: 5184000

--force

Regenerate certificates even if not reaching expiry

Default: False

update-built

Update built tests

wpt update-built [-h] [--list]
                 [--include [{canvas,conformance-checkers,css-ui,html5lib,infrastructure,mimesniff,speculative-parsing} ...]]

Named Arguments

--list

List suites that can be updated and the related script files

Default: False

--include

Possible choices: canvas, conformance-checkers, css-ui, html5lib, infrastructure, mimesniff, speculative-parsing

Suites to update (default is to update everything)

tc-download

Download logs from taskcluster

wpt tc-download [-h] [--ref REF] [--artifact-name ARTIFACT_NAME]
                [--repo-name REPO_NAME] [--token-file TOKEN_FILE]
                [--out-dir OUT_DIR]

Named Arguments

--ref

Branch (in the GitHub repository) or commit to fetch logs for

Default: “master”

--artifact-name

Log type to fetch

Default: “wpt_report.json.gz”

--repo-name

GitHub repo name in the format owner/repo. This must be the repo from which the Taskcluster run was scheduled (for PRs this is the repo into which the PR would merge)

Default: “web-platform-tests/wpt”

--token-file

File containing GitHub token

--out-dir

Path to save the logfiles

Default: “.”

tc-decision

Run the decision task

wpt tc-decision [-h] [--event-path EVENT_PATH] [--dry-run]
                [--tasks-path TASKS_PATH]

Named Arguments

--event-path

Path to file containing serialized GitHub event

--dry-run

Don’t actually create the tasks, just output the tasks that would be created

Default: False

--tasks-path

Path to file in which to write payload for all scheduled tasks

tc-sink-task

Run the sink task

wpt tc-sink-task [-h] [--github-checks-text-file GITHUB_CHECKS_TEXT_FILE]
                 tasks [tasks ...]

Positional Arguments

tasks

A set of Taskcluster task ids to verify the state of.

Named Arguments

--github-checks-text-file

Path to GitHub checks output file for Taskcluster runs

docker-run

Run wpt docker image

wpt docker-run [-h] [--rebuild] [--checkout CHECKOUT] [--privileged]
               [--tag TAG]

Named Arguments

--rebuild

Force rebuild of image

Default: False

--checkout

Revision to checkout in the image. If this is not supplied we mount the wpt checkout on the host as /home/test/web-platform-tests/

--privileged

Run the image in priviledged mode (required for emulators)

Default: False

--tag

Docker image tag to use (default wpt:local)

Default: “wpt:local”

docker-push

Build and push wpt docker image

wpt docker-push [-h] [--tag TAG] [--force]

Named Arguments

--tag

Tag to use (default is taken from .taskcluster.yml)

--force

Ignore warnings and push anyway

Default: False

lint

Run the lint

wpt lint [-h] [--json] [--markdown] [--repo-root REPO_ROOT]
         [--ignore-glob IGNORE_GLOB] [--all]
         [--github-checks-text-file GITHUB_CHECKS_TEXT_FILE] [-j JOBS]
         [paths ...]

Positional Arguments

paths

List of paths to lint

Named Arguments

--json

Output machine-readable JSON format

Default: False

--markdown

Output markdown

Default: False

--repo-root

The WPT directory. Use this option if the lint script exists outside the repository

--ignore-glob

Additional file glob to ignore (repeat to add more). Globs are matched against paths relative to REPO_ROOT using fnmatch, except that path separators are normalized.

--all

If no paths are passed, try to lint the whole working directory, not just files that changed

Default: False

--github-checks-text-file

Path to GitHub checks output file for Taskcluster runs

-j, --jobs

Level to parallelism to use (defaults to 0, which detects the number of CPUs)

Default: 0

manifest

Update the MANIFEST.json file

wpt manifest [-h] [-v] [-p PATH] [--tests-root TESTS_ROOT] [-r]
             [--url-base URL_BASE] [--no-download] [--cache-root CACHE_ROOT]
             [--no-parallel]

Named Arguments

-v, --verbose

Turn on verbose logging

Default: False

-p, --path

Path to manifest file.

--tests-root

Path to root of tests.

Default: /home/runner/work/wpt/wpt

-r, --rebuild

Force a full rebuild of the manifest.

Default: False

--url-base

Base url to use as the mount point for tests in this manifest.

Default: “/”

--no-download

Never attempt to download the manifest.

Default: True

--cache-root

Path in which to store any caches (default <tests_root>/.wptcache/)

Default: “/home/runner/work/wpt/wpt/.wptcache”

--no-parallel

Do not parallelize building the manifest

Default: True

manifest-download

Download recent pregenerated MANIFEST.json file

wpt manifest-download [-h] [-p PATH] [--tests-root TESTS_ROOT] [--force]

Named Arguments

-p, --path

Path to manifest file.

--tests-root

Path to root of tests.

Default: /home/runner/work/wpt/wpt

--force

Always download, even if the existing manifest is recent

Default: False

test-paths

Print test paths given a set of test ids

wpt test-paths [-h] [-p PATH] [--src-root SRC_ROOT] [--tests-root TESTS_ROOT]
               [--no-update] [-r] [--url-base URL_BASE]
               [--cache-root CACHE_ROOT] [--json]
               test_ids [test_ids ...]

Positional Arguments

test_ids

Test ids for which to get paths

Named Arguments

-p, --path

Path to manifest file.

--src-root

Path to root of sourcetree.

--tests-root

Path to root of tests.

Default: /home/runner/work/wpt/wpt

--no-update

Don’t update manifest before continuing

Default: True

-r, --rebuild

Force a full rebuild of the manifest.

Default: False

--url-base

Base url to use as the mount point for tests in this manifest.

Default: “/”

--cache-root

Path in which to store any caches (default <tests_root>/.wptcache/)

Default: “/home/runner/work/wpt/wpt/.wptcache”

--json

Output as JSON

Default: False

serve

Run wptserve server

wpt serve [-h] [--latency LATENCY] [--config CONFIG_PATH]
          [--doc_root DOC_ROOT] [--ws_doc_root WS_DOC_ROOT]
          [--alias_file ALIAS_FILE] [--no-h2] [--webtransport-h3]
          [--exit-after-start] [--verbose]

Named Arguments

--latency

Artificial latency to add before sending http responses, in ms

--config

Path to external config file

--doc_root

Path to document root. Overrides config.

--ws_doc_root

Path to WebSockets document root. Overrides config.

--alias_file

File with entries for aliases/multiple doc roots. In form of /ALIAS_NAME/, DOC_ROOTn

--no-h2

Disable the HTTP/2.0 server

--webtransport-h3

Enable WebTransport over HTTP/3 server

Default: False

--exit-after-start

Exit after starting servers

Default: False

--verbose

Enable verbose logging

Default: False

serve-wave

Run wptserve server for WAVE

wpt serve-wave [-h] [--latency LATENCY] [--config CONFIG_PATH]
               [--doc_root DOC_ROOT] [--ws_doc_root WS_DOC_ROOT]
               [--alias_file ALIAS_FILE] [--no-h2] [--webtransport-h3]
               [--exit-after-start] [--verbose] [--report]

Named Arguments

--latency

Artificial latency to add before sending http responses, in ms

--config

Path to external config file

--doc_root

Path to document root. Overrides config.

--ws_doc_root

Path to WebSockets document root. Overrides config.

--alias_file

File with entries for aliases/multiple doc roots. In form of /ALIAS_NAME/, DOC_ROOTn

--no-h2

Disable the HTTP/2.0 server

--webtransport-h3

Enable WebTransport over HTTP/3 server

Default: False

--exit-after-start

Exit after starting servers

Default: False

--verbose

Enable verbose logging

Default: False

--report

Flag for enabling the WPTReporting server

Default: False

run

Run tests in a browser

wpt run
        [--channel {stable,release,beta,dev,canary,nightly,preview,experimental}]
        [--affected AFFECTED] [--yes] [--install-browser]
        [--install-webdriver] [-h] [--manifest-update] [--no-manifest-update]
        [--manifest-download] [--no-manifest-download]
        [--timeout-multiplier TIMEOUT_MULTIPLIER] [--run-by-dir [RUN_BY_DIR]]
        [--processes PROCESSES] [--no-capture-stdio] [--no-fail-on-unexpected]
        [--no-fail-on-unexpected-pass] [--list-test-groups] [--list-disabled]
        [--list-tests] [--verify] [--verify-log-full]
        [--verify-repeat-loop VERIFY_REPEAT_LOOP]
        [--verify-repeat-restart VERIFY_REPEAT_RESTART]
        [--verify-no-chaos-mode | --verify-chaos-mode]
        [--verify-max-time VERIFY_MAX_TIME]
        [--verify-no-output-results | --verify-output-results]
        [--test-types [{crashtest,testharness,wdspec,reftest,print-reftest} ...]]
        [--include INCLUDE] [--include-file INCLUDE_FILE] [--exclude EXCLUDE]
        [--include-manifest INCLUDE_MANIFEST] [--test-groups TEST_GROUPS_FILE]
        [--skip-timeout]
        [--skip-implementation-status {not-implementing,backlog,implementing}]
        [--enable-webtransport-h3] [--tag TAGS] [--default-exclude]
        [--debugger [DEBUGGER]] [--debugger-args DEBUGGER_ARGS]
        [--rerun RERUN] [--repeat REPEAT] [--repeat-until-unexpected]
        [--pause-after-test] [--no-pause-after-test] [--debug-test]
        [--pause-on-unexpected] [--no-restart-on-unexpected]
        [--symbols-path SYMBOLS_PATH] [--stackwalk-binary STACKWALK_BINARY]
        [--pdb] [--adb-binary ADB_BINARY] [--package-name PACKAGE_NAME]
        [--keep-app-data-directory] [--device-serial DEVICE_SERIAL]
        [--binary BINARY] [--binary-arg BINARY_ARGS]
        [--webdriver-binary BINARY] [--webdriver-arg WEBDRIVER_ARGS]
        [--metadata METADATA_ROOT] [--tests TESTS_ROOT]
        [--manifest MANIFEST_PATH] [--run-info RUN_INFO]
        [--product {android_weblayer,android_webview,chrome,chrome_android,chrome_ios,edgechromium,edge,edge_webdriver,firefox,firefox_android,ie,safari,sauce,servo,servodriver,opera,webkit,webkitgtk_minibrowser,epiphany}]
        [--browser-version BROWSER_VERSION]
        [--browser-channel BROWSER_CHANNEL] [--config CONFIG]
        [--install-fonts] [--no-install-fonts] [--font-dir FONT_DIR]
        [--headless] [--no-headless] [--instrument-to-file INSTRUMENT_TO_FILE]
        [--debug-build | --release-build] [--total-chunks TOTAL_CHUNKS]
        [--this-chunk THIS_CHUNK] [--chunk-type {none,hash,dir_hash}]
        [--ssl-type {openssl,pregenerated,none}]
        [--openssl-binary OPENSSL_BINARY] [--certutil-binary CERTUTIL_BINARY]
        [--ca-cert-path CA_CERT_PATH] [--host-key-path HOST_KEY_PATH]
        [--host-cert-path HOST_CERT_PATH] [--prefs-root PREFS_ROOT]
        [--preload-browser] [--no-preload-browser] [--disable-e10s]
        [--enable-webrender] [--no-enable-webrender] [--enable-fission]
        [--no-enable-fission] [--stackfix-dir STACKFIX_DIR]
        [--specialpowers-path SPECIALPOWERS_PATH] [--setpref PREF=VALUE]
        [--leak-check] [--no-leak-check] [--stylo-threads STYLO_THREADS]
        [--reftest-internal] [--reftest-external]
        [--reftest-screenshot {always,fail,unexpected}]
        [--chaos [CHAOS_MODE_FLAGS]] [--user-stylesheet USER_STYLESHEETS]
        [--enable-mojojs] [--mojojs-path MOJOJS_PATH] [--enable-swiftshader]
        [--sauce-browser SAUCE_BROWSER] [--sauce-platform SAUCE_PLATFORM]
        [--sauce-version SAUCE_VERSION] [--sauce-build SAUCE_BUILD]
        [--sauce-tags [SAUCE_TAGS ...]] [--sauce-tunnel-id SAUCE_TUNNEL_ID]
        [--sauce-user SAUCE_USER] [--sauce-key SAUCE_KEY]
        [--sauce-connect-binary SAUCE_CONNECT_BINARY]
        [--sauce-init-timeout SAUCE_INIT_TIMEOUT]
        [--sauce-connect-arg SAUCE_CONNECT_ARGS]
        [--github-checks-text-file GITHUB_CHECKS_TEXT_FILE]
        [--webkit-port WEBKIT_PORT] [--kill-safari] [--log-raw LOG_RAW]
        [--log-unittest LOG_UNITTEST] [--log-xunit LOG_XUNIT]
        [--log-html LOG_HTML] [--log-mach LOG_MACH] [--log-tbpl LOG_TBPL]
        [--log-grouped LOG_GROUPED] [--log-chromium LOG_CHROMIUM]
        [--log-wptreport LOG_WPTREPORT]
        [--log-wptscreenshot LOG_WPTSCREENSHOT]
        [--log-raw-level LOG_RAW_LEVEL] [--log-mach-verbose]
        [--log-mach-level LOG_MACH_LEVEL] [--log-mach-buffer LOG_MACH_BUFFER]
        [--log-mach-screenshot] [--log-mach-no-screenshot]
        [--log-tbpl-compact] [--log-tbpl-level LOG_TBPL_LEVEL]
        [--log-tbpl-buffer LOG_TBPL_BUFFER]
        [--log-wptscreenshot-api LOG_WPTSCREENSHOT_API]
        product [test_list ...]

Positional Arguments

product

Browser to run tests in

test_list

List of URLs for tests to run, or paths including tests to run. (equivalent to –include)

Named Arguments

--channel

Possible choices: stable, release, beta, dev, canary, nightly, preview, experimental

Name of browser release channel (default: nightly). “stable” and “release” are synonyms for the latest browser stable release; “beta” is the beta release; “dev” is only meaningful for Chrome (i.e. Chrome Dev); “nightly”, “experimental”, and “preview” are all synonyms for the latest available development or trunk release. (For WebDriver installs, we attempt to select an appropriate, compatible version for the latest browser release on the selected channel.) This flag overrides –browser-channel.

Default: “nightly”

--affected

Run affected tests since revish

--yes, -y

Don’t prompt before installing components

Default: True

--install-browser

Install the browser from the release channel specified by –channel (or the nightly channel by default).

Default: False

--install-webdriver

Install WebDriver from the release channel specified by –channel (or the nightly channel by default).

Default: False

--manifest-update

Regenerate the test manifest.

--no-manifest-update

Prevent regeneration of the test manifest.

Default: True

--manifest-download

Attempt to download a preexisting manifest when updating.

--no-manifest-download

Prevent download of the test manifest.

Default: True

--timeout-multiplier

Multiplier relative to standard test timeout to use

--run-by-dir

Split run into groups by directories. With a parameter,limit the depth of splits e.g. –run-by-dir=1 to split by top-leveldirectory

Default: False

--processes

Number of simultaneous processes to use

--no-capture-stdio

Don’t capture stdio and write to logging

Default: False

--no-fail-on-unexpected

Exit with status code 0 when test expectations are violated

Default: True

--no-fail-on-unexpected-pass

Exit with status code 0 when all unexpected results are PASS

Default: True

--verify

Run a stability check on the selected tests

Default: False

--verify-no-chaos-mode

Disable chaos mode when running on Firefox

Default: True

--verify-chaos-mode

Enable chaos mode when running on Firefox

Default: True

--verify-no-output-results

Prints individuals test results and messages

Default: True

--verify-output-results

Disable printing individuals test results and messages

Default: True

--debug-build

Build is a debug build (overrides any mozinfo file)

--release-build

Build is a release (overrides any mozinfo file)

Mode

--list-test-groups

List the top level directories containing tests that will run.

Default: False

--list-disabled

List the tests that are disabled on the current platform

Default: False

--list-tests

List all tests that will run

Default: False

--verify-log-full

Output per-iteration test results when running verify

Default: False

--verify-repeat-loop

Number of iterations for a run that reloads each test without restart.

Default: 10

--verify-repeat-restart

Number of iterations, for a run that restarts the runner between each iteration

Default: 5

--verify-max-time

The maximum number of minutes for the job to run

Test Selection

--test-types

Possible choices: crashtest, testharness, wdspec, reftest, print-reftest

Test types to run

Default: {‘crashtest’, ‘testharness’, ‘wdspec’, ‘reftest’, ‘print-reftest’}

--include

URL prefix to include

--include-file

A file listing URL prefix for tests

--exclude

URL prefix to exclude

--include-manifest

Path to manifest listing tests to include

--test-groups

Path to json file containing a mapping {group_name: [test_ids]}

--skip-timeout

Skip tests that are expected to time out

Default: False

--skip-implementation-status

Possible choices: not-implementing, backlog, implementing

Skip tests that have the given implementation status

--enable-webtransport-h3

Enable tests that require WebTransport over HTTP/3 server (default: false)

Default: False

--tag

Labels applied to tests to include in the run. Labels starting dir: are equivalent to top-level directories.

--default-exclude

Only run the tests explicitly given in arguments. No tests will run if the list is empty, and the program will exit with status code 0.

Default: False

Debugging

--debugger

run under a debugger, e.g. gdb or valgrind

--debugger-args

arguments to the debugger

--rerun

Number of times to re run each test without restarts

Default: 1

--repeat

Number of times to run the tests, restarting between each run

Default: 1

--repeat-until-unexpected

Run tests in a loop until one returns an unexpected result

--pause-after-test

Halt the test runner after each test (this happens by default if only a single test is run)

--no-pause-after-test

Don’t halt the test runner irrespective of the number of tests run

Default: True

--debug-test

Run tests with additional debugging features enabled

Default: False

--pause-on-unexpected

Halt the test runner when an unexpected result is encountered

Default: False

--no-restart-on-unexpected

Don’t restart on an unexpected result

Default: True

--symbols-path

Path or url to symbols file used to analyse crash minidumps.

--stackwalk-binary

Path to stackwalker program used to analyse minidumps.

--pdb

Drop into pdb on python exception

Default: False

Android specific arguments

--adb-binary

Path to adb binary to use

--package-name

Android package name to run tests against

--keep-app-data-directory

Don’t delete the app data directory

Default: False

--device-serial

Running Android instance to connect to, if not emulator-5554

Configuration

--binary

Desktop binary to run tests against

--binary-arg

Extra argument for the binary

Default: []

--webdriver-binary

WebDriver server binary to use

--webdriver-arg

Extra argument for the WebDriver binary

Default: []

--metadata

Path to root directory containing test metadata

--tests

Path to root directory containing test files

--manifest

Path to test manifest (default is ${metadata_root}/MANIFEST.json)

--run-info

Path to directory containing extra json files to add to run info

--product

Possible choices: android_weblayer, android_webview, chrome, chrome_android, chrome_ios, edgechromium, edge, edge_webdriver, firefox, firefox_android, ie, safari, sauce, servo, servodriver, opera, webkit, webkitgtk_minibrowser, epiphany

Browser against which to run tests

--browser-version

Informative string detailing the browser release version. This is included in the run_info data.

--browser-channel

Informative string detailing the browser release channel. This is included in the run_info data.

--config

Path to config file

--install-fonts

Install additional system fonts on your system

--no-install-fonts

Do not install additional system fonts on your system

Default: True

--font-dir

Path to local font installation directory

--headless

Run browser in headless mode

--no-headless

Don’t run browser in headless mode

Default: True

--instrument-to-file

Path to write instrumentation logs to

Test Chunking

--total-chunks

Total number of chunks to use

Default: 1

--this-chunk

Chunk number to run

Default: 1

--chunk-type

Possible choices: none, hash, dir_hash

Chunking type to use

SSL/TLS

--ssl-type

Possible choices: openssl, pregenerated, none

Type of ssl support to enable (running without ssl may lead to spurious errors)

--openssl-binary

Path to openssl binary

Default: “openssl”

--certutil-binary

Path to certutil binary for use with Firefox + ssl

--ca-cert-path

Path to ca certificate when using pregenerated ssl certificates

--host-key-path

Path to host private key when using pregenerated ssl certificates

--host-cert-path

Path to host certificate when using pregenerated ssl certificates

Gecko-specific

--prefs-root

Path to the folder containing browser prefs

--preload-browser

Preload a gecko instance for faster restarts

--no-preload-browser

Don’t preload a gecko instance for faster restarts

--disable-e10s

Run tests without electrolysis preferences

Default: True

--enable-webrender

Enable the WebRender compositor in Gecko (defaults to disabled).

--no-enable-webrender

Disable the WebRender compositor in Gecko.

Default: True

--enable-fission

Enable fission in Gecko (defaults to disabled).

--no-enable-fission

Disable fission in Gecko.

Default: True

--stackfix-dir

Path to directory containing assertion stack fixing scripts

--specialpowers-path

Path to specialPowers extension xpi file

--setpref

Defines an extra user preference (overrides those in prefs_root)

Default: []

--leak-check

Enable leak checking (enabled by default for debug builds, silently ignored for opt, mobile)

--no-leak-check

Disable leak checking

--stylo-threads

Number of parallel threads to use for stylo

Default: 1

--reftest-internal

Enable reftest runner implemented inside Marionette

--reftest-external

Disable reftest runner implemented inside Marionette

Default: True

--reftest-screenshot

Possible choices: always, fail, unexpected

With –reftest-internal, when to take a screenshot

--chaos

Enable chaos mode with the specified feature flag (see http://searchfox.org/mozilla-central/source/mfbt/ChaosMode.h for details). If no value is supplied, all features are activated

Servo-specific

--user-stylesheet

Inject a user CSS stylesheet into every test.

Default: []

Chrome-specific

--enable-mojojs

Enable MojoJS for testing. Note that this flag is usally enabled automatically by wpt run, if it succeeds in downloading the right version of mojojs.zip or if –mojojs-path is specified.

Default: False

--mojojs-path

Path to mojojs gen/ directory. If it is not specified, wpt run will download and extract mojojs.zip into _venv2/mojojs/gen.

--enable-swiftshader

Enable SwiftShader for CPU-based 3D graphics. This can be used in environments with no hardware GPU available.

Default: False

Sauce Labs-specific

--sauce-browser

Sauce Labs browser name

--sauce-platform

Sauce Labs OS platform

--sauce-version

Sauce Labs browser version

--sauce-build

Sauce Labs build identifier

--sauce-tags

Sauce Labs identifying tag

Default: []

--sauce-tunnel-id

Sauce Connect tunnel identifier

--sauce-user

Sauce Labs user name

--sauce-key

Sauce Labs access key

--sauce-connect-binary

Path to Sauce Connect binary

--sauce-init-timeout

Number of seconds to wait for Sauce Connect tunnel to be available before aborting

Default: 30

--sauce-connect-arg

Command-line argument to forward to the Sauce Connect binary (repeatable)

Default: []

Taskcluster-specific

--github-checks-text-file

Path to GitHub checks output file

WebKit-specific

--webkit-port

WebKit port

Safari-specific

--kill-safari

Kill Safari when stopping the browser

Default: False

Output Logging

Each option represents a possible logging format and takes a filename to write that format to, or ‘-‘ to write to stdout. Some options are provided by the mozlog utility; see https://firefox-source-docs.mozilla.org/mozbase/mozlog.html for extended documentation.

--log-raw

Raw structured log messages (provided by mozlog)

--log-unittest

Unittest style output (provided by mozlog)

--log-xunit

xUnit compatible XML (povided by mozlog)

--log-html

HTML report (provided by mozlog)

--log-mach

Human-readable output (provided by mozlog)

--log-tbpl

TBPL style log format (provided by mozlog)

--log-grouped

Grouped summary of test results (provided by mozlog)

--log-chromium

Chromium Layout Tests format

--log-wptreport

wptreport format

--log-wptscreenshot

wpt.fyi screenshots

--log-raw-level

A least log level to subscribe to for the given formatter (debug, info, error, etc.)

--log-mach-verbose

Enables verbose mode for the given formatter.

--log-mach-level

A least log level to subscribe to for the given formatter (debug, info, error, etc.)

--log-mach-buffer

If specified, enables message buffering at the given buffer size limit.

--log-mach-screenshot

Enable logging reftest-analyzer compatible screenshot data.

--log-mach-no-screenshot

Disable logging reftest-analyzer compatible screenshot data.

--log-tbpl-compact

Enables compact mode for the given formatter.

--log-tbpl-level

A least log level to subscribe to for the given formatter (debug, info, error, etc.)

--log-tbpl-buffer

If specified, enables message buffering at the given buffer size limit.

--log-wptscreenshot-api

Cache API (default: https://wpt.fyi/api/screenshots/hashes)

create

Create a new wpt test

wpt create [-h] [--no-editor] [-e EDITOR] [--long-timeout] [--overwrite] [-r]
           [-m REF] [--mismatch] [--wait] [--tests-root TESTS_ROOT]
           path

Positional Arguments

path

Path to the test file

Named Arguments

--no-editor

Don’t try to open the test in an editor

Default: False

-e, --editor

Editor to use

--long-timeout

Test should be given a long timeout (typically 60s rather than 10s, but varies depending on environment)

Default: False

--overwrite

Allow overwriting an existing test file

Default: False

-r, --reftest

Create a reftest rather than a testharness (js) test

Default: False

-m, --reference

Path to the reference file

--mismatch

Create a mismatch reftest

Default: False

--wait

Create a reftest that waits until takeScreenshot() is called

Default: False

--tests-root

Path to the root of the wpt directory

Default: “/home/runner/work/wpt/wpt/tools/wpt/../..”

update-expectations

Update expectations files from raw logs.

wpt update-expectations [-h]
                        [--product {android_weblayer,android_webview,chrome,chrome_android,chrome_ios,edgechromium,edge,edge_webdriver,firefox,firefox_android,ie,safari,sauce,servo,servodriver,opera,webkit,webkitgtk_minibrowser,epiphany}]
                        [--config CONFIG] [--metadata METADATA_ROOT]
                        [--tests TESTS_ROOT] [--manifest MANIFEST_PATH]
                        [--sync-path SYNC_PATH] [--remote_url REMOTE_URL]
                        [--branch BRANCH] [--rev REV] [--patch] [--no-patch]
                        [--sync] [--full]
                        [--disable-intermittent [DISABLE_INTERMITTENT]]
                        [--update-intermittent] [--remove-intermittent]
                        [--no-remove-obsolete] [--no-store-state] [--continue]
                        [--abort] [--exclude [EXCLUDE ...]]
                        [--include [INCLUDE ...]]
                        [--extra-property EXTRA_PROPERTY] [--log-raw LOG_RAW]
                        [--log-unittest LOG_UNITTEST] [--log-xunit LOG_XUNIT]
                        [--log-html LOG_HTML] [--log-mach LOG_MACH]
                        [--log-tbpl LOG_TBPL] [--log-grouped LOG_GROUPED]
                        [--log-chromium LOG_CHROMIUM]
                        [--log-wptreport LOG_WPTREPORT]
                        [--log-wptscreenshot LOG_WPTSCREENSHOT]
                        [--log-raw-level LOG_RAW_LEVEL] [--log-mach-verbose]
                        [--log-mach-level LOG_MACH_LEVEL]
                        [--log-mach-buffer LOG_MACH_BUFFER]
                        [--log-mach-screenshot] [--log-mach-no-screenshot]
                        [--log-tbpl-compact] [--log-tbpl-level LOG_TBPL_LEVEL]
                        [--log-tbpl-buffer LOG_TBPL_BUFFER]
                        [--log-wptscreenshot-api LOG_WPTSCREENSHOT_API]
                        [run_log ...]

Positional Arguments

run_log

Log file from run of tests

Named Arguments

--product

Possible choices: android_weblayer, android_webview, chrome, chrome_android, chrome_ios, edgechromium, edge, edge_webdriver, firefox, firefox_android, ie, safari, sauce, servo, servodriver, opera, webkit, webkitgtk_minibrowser, epiphany

Browser for which metadata is being updated

--config

Path to config file

--metadata

Path to the folder containing test metadata

--tests

Path to web-platform-tests

--manifest

Path to test manifest (default is ${metadata_root}/MANIFEST.json)

--sync-path

Path to store git checkout of web-platform-tests during update

--remote_url

URL of web-platfrom-tests repository to sync against

--branch

Remote branch to sync against

--rev

Revision to sync to

--patch

Create a VCS commit containing the changes.

--no-patch

Don’t create a VCS commit containing the changes.

Default: True

--sync

Sync the tests with the latest from upstream (implies –patch)

Default: False

--full

For all tests that are updated, remove any existing conditions and missing subtests

Default: False

--disable-intermittent

Reason for disabling tests. When updating test results, disable tests that have inconsistent results across many runs with the given reason.

--update-intermittent

Update test metadata with expected intermittent statuses.

Default: False

--remove-intermittent

Remove obsolete intermittent statuses from expected statuses.

Default: False

--no-remove-obsolete

Don’t remove metadata files that no longer correspond to a test file

Default: True

--no-store-state

Store state so that steps can be resumed after failure

Default: True

--continue

Continue a previously started run of the update script

Default: False

--abort

Clear state from a previous incomplete run of the update script

Default: False

--exclude

List of glob-style paths to exclude when syncing tests

--include

List of glob-style paths to include which would otherwise be excluded when syncing tests

--extra-property

Extra property from run_info.json to use in metadata update

Default: []

Output Logging

Each option represents a possible logging format and takes a filename to write that format to, or ‘-‘ to write to stdout. Some options are provided by the mozlog utility; see https://firefox-source-docs.mozilla.org/mozbase/mozlog.html for extended documentation.

--log-raw

Raw structured log messages (provided by mozlog)

--log-unittest

Unittest style output (provided by mozlog)

--log-xunit

xUnit compatible XML (povided by mozlog)

--log-html

HTML report (provided by mozlog)

--log-mach

Human-readable output (provided by mozlog)

--log-tbpl

TBPL style log format (provided by mozlog)

--log-grouped

Grouped summary of test results (provided by mozlog)

--log-chromium

Chromium Layout Tests format

--log-wptreport

wptreport format

--log-wptscreenshot

wpt.fyi screenshots

--log-raw-level

A least log level to subscribe to for the given formatter (debug, info, error, etc.)

--log-mach-verbose

Enables verbose mode for the given formatter.

--log-mach-level

A least log level to subscribe to for the given formatter (debug, info, error, etc.)

--log-mach-buffer

If specified, enables message buffering at the given buffer size limit.

--log-mach-screenshot

Enable logging reftest-analyzer compatible screenshot data.

--log-mach-no-screenshot

Disable logging reftest-analyzer compatible screenshot data.

--log-tbpl-compact

Enables compact mode for the given formatter.

--log-tbpl-level

A least log level to subscribe to for the given formatter (debug, info, error, etc.)

--log-tbpl-buffer

If specified, enables message buffering at the given buffer size limit.

--log-wptscreenshot-api

Cache API (default: https://wpt.fyi/api/screenshots/hashes)

files-changed

Get a list of files that have changed

wpt files-changed [-h] [--ignore-rule IGNORE_RULE] [--modified] [--new]
                  [--show-type] [--null]
                  [revish]

Positional Arguments

revish

Commits to consider. Defaults to the commits on the current branch

Named Arguments

--ignore-rule

Override the rules for paths to exclude from lists of changes. Rules are paths relative to the test root, with * before a separator or the end matching anything other than a path separator and ** in that position matching anything. This flag can be used multiple times for multiple rules. Specifying this flag overrides the default: resources/testharness*, resources/testdriver*

--modified

Include files under version control that have been modified or staged

Default: False

--new

Include files in the worktree that are not in version control

Default: False

--show-type

Print the test type along with each affected test

Default: False

--null

Separate items with a null byte

Default: False

tests-affected

Get a list of tests affected by changes

wpt tests-affected [-h] [--ignore-rule IGNORE_RULE] [--modified] [--new]
                   [--show-type] [--null] [--metadata METADATA_ROOT]
                   [revish]

Positional Arguments

revish

Commits to consider. Defaults to the commits on the current branch

Named Arguments

--ignore-rule

Override the rules for paths to exclude from lists of changes. Rules are paths relative to the test root, with * before a separator or the end matching anything other than a path separator and ** in that position matching anything. This flag can be used multiple times for multiple rules. Specifying this flag overrides the default: resources/testharness*, resources/testdriver*

--modified

Include files under version control that have been modified or staged

Default: False

--new

Include files in the worktree that are not in version control

Default: False

--show-type

Print the test type along with each affected test

Default: False

--null

Separate items with a null byte

Default: False

--metadata

Directory that will contain MANIFEST.json

Default: “/home/runner/work/wpt/wpt”

install

Install browser components

wpt install [-h]
            [--channel {stable,release,beta,dev,canary,nightly,preview,experimental}]
            [--download-only] [--rename RENAME] [-d DESTINATION]
            {firefox,chrome,servo} {browser,webdriver}

Positional Arguments

browser

Possible choices: firefox, chrome, servo

name of web browser product

component

Possible choices: browser, webdriver

name of component

Named Arguments

--channel

Possible choices: stable, release, beta, dev, canary, nightly, preview, experimental

Name of browser release channel (default: nightly). “stable” and “release” are synonyms for the latest browser stable release; “beta” is the beta release; “dev” is only meaningful for Chrome (i.e. Chrome Dev); “nightly”, “experimental”, and “preview” are all synonyms for the latest available development or trunk release. (For WebDriver installs, we attempt to select an appropriate, compatible version for the latest browser release on the selected channel.) This flag overrides –browser-channel.

Default: “nightly”

--download-only

Download the selected component but don’t install it

Default: False

--rename

Filename, excluding extension for downloaded archive (only with –download-only)

-d, --destination

filesystem directory to place the component

rev-list

List tagged revisions at regular intervals

wpt rev-list [-h] [--epoch EPOCH] [--max-count MAX_COUNT]

Named Arguments

--epoch

regular interval of time selected to get the tagged revisions. Valid values are digits followed by h/d/w (e.x. 9h, 9d, 9w …) where the mimimun selectable interval is one hour (1h)

Default: 1d

--max-count

maximum number of revisions to be returned by the command

Default: 1

install-android-emulator

Setup the x86 android emulator

wpt install-android-emulator [-h] [--reinstall]

Named Arguments

--reinstall

Force reinstall even if the emulator already exists

Default: False

start-android-emulator

Start the x86 android emulator

wpt start-android-emulator [-h] [--reinstall]

Named Arguments

--reinstall

Force reinstall even if the emulator already exists

Default: False