mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
Meta: Ensure required hosts are present before running tests in WPT.sh
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.
This commit is contained in:
parent
ea61e189eb
commit
819f966419
Notes:
github-actions[bot]
2024-08-17 05:44:39 +00:00
Author: https://github.com/tcl3
Commit: 819f966419
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1086
1 changed files with 6 additions and 0 deletions
|
@ -86,6 +86,12 @@ ensure_wpt_repository() {
|
|||
if [ ! -d .git ]; then
|
||||
git clone --depth 1 "${WPT_REPOSITORY_URL}" "${WPT_SOURCE_DIR}"
|
||||
fi
|
||||
|
||||
# Update hosts file if needed
|
||||
if [ "$(comm -13 <(sort -u /etc/hosts) <(./wpt make-hosts-file | sort -u) | wc -l)" -gt 0 ]; then
|
||||
echo "Enter superuser password to append wpt hosts to /etc/hosts"
|
||||
./wpt make-hosts-file | sudo tee -a /etc/hosts
|
||||
fi
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue