This change allows the test list given to “WPT.sh run” to include full
filesystem relative or absolute pathnames. That facilitates using tab
completion in the shell to browse for pathnames, and also facilitates
copy-paste of full filesystem pathnames. For example:
./Meta/WPT.sh run Tests/LibWeb/WPT/wpt/dom/historical.html
./Meta/WPT.sh run /opt/ladybird/Tests/LibWeb/WPT/wpt/dom/historical.html
Otherwise, without this change, the test list can’t include full
filesystem pathnames, but is instead limited to only path fragments that
specify WPT subdirectory pathnames — which doesn’t allow for tab
completion on pathnames in the shell, nor copy-paste of full pathnames.
To help people in troubleshooting problems when running the WPT.sh
script, this change makes the script echo to stdout the complete
“wpt run” invocation (including all the flags and path args).
We have more work to do before we can run WPT headlessly by default
(i.e. handling alerts). But for now, we can run it headlessly locally
with the --headless flag.
Between WPT.sh and ladybird.sh.
This is useful to me as I set my default build configuration to Debug,
and have been hacking around with the WPT script to align with this
configuration.
ladybird.sh allows the source directory to be overriden to point to
another source directory. I am not sure if anyone is actually using this
behaviour in practise, but let's make the behaviour at least common
between the two scripts with a helper function.
This change allows the user to specify the format of the log file to be
generated by the `WPT.sh` script. Multiple logging arguments may now be
specified.
The supported logging arguments are: `--log-raw`, `--log-unittest`,
`--log-xunit`, `--log-html`, `--log-mach`, `--log-tbpl`,
`--log-grouped`, `--log-chromium`, `--log-wptreport` and
`--log-wptscreenshot`. These arguments act the same as the equivalent
arguments supported by `wpt run`.
The short `--log` argument may also be used as an alias for `--log-raw`.
The Web Platform Tests runner requires that some hostnames point to
localhost when running the tests locally. We now append these hostnames
to `/etc/hosts` if they aren't already present.