Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1924976] add webkit2gtk-4.1 folder for the MiniBrowser. #48663

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions docs/running-tests/webkitgtk_minibrowser.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ The WebKitGTK MiniBrowser is not installed on the default binary path.
The `wpt` script will try to automatically locate it, but if you need
to run it manually you can find it on any of this paths:

* Fedora: `/usr/libexec/webkit2gtk-4.0/MiniBrowser`
* Debian or Ubuntu: `/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/MiniBrowser`
* Note: if the machine architecture is not `x86_64`, then it will be located
inside:
`/usr/lib/${TRIPLET}/webkit2gtk-4.0/MiniBrowser`
where `TRIPLET=$(gcc -dumpmachine)`
* Fedora: `/usr/libexec/webkit2gtk-${VERSION}/MiniBrowser`
* Debian or Ubuntu: `/usr/lib/x86_64-linux-gnu/webkit2gtk-${VERSION}/MiniBrowser`
* Note:
* `VERSION` is `4.0` or `4.1`.
* If not Fedora and the machine architecture is not `x86_64`, then it will
be located inside:
`/usr/lib/${TRIPLET}/webkit2gtk-${VERSION}/MiniBrowser`
where `TRIPLET=$(gcc -dumpmachine)`
13 changes: 10 additions & 3 deletions tools/wpt/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2467,7 +2467,6 @@ def find_binary(self, venv_path=None, channel=None):
if minibrowser_path:
return minibrowser_path

libexecpaths = ["/usr/libexec/webkit2gtk-4.0"] # Fedora path
triplet = "x86_64-linux-gnu"
# Try to use GCC to detect this machine triplet
gcc = which("gcc")
Expand All @@ -2476,8 +2475,16 @@ def find_binary(self, venv_path=None, channel=None):
triplet = call(gcc, "-dumpmachine").strip()
except subprocess.CalledProcessError:
pass
# Add Debian/Ubuntu path
libexecpaths.append("/usr/lib/%s/webkit2gtk-4.0" % triplet)

versions = ["4.0", "4.1"]
libexecpaths = []

for version in versions:
# Fedora paths.
libexecpaths.append(f"/usr/libexec/webkit2gtk-{version}")
# Debian/Ubuntu paths
libexecpaths.append(f"/usr/lib/{triplet}/webkit2gtk-{version}")

return which("MiniBrowser", path=os.pathsep.join(libexecpaths))

def find_webdriver(self, venv_path=None, channel=None):
Expand Down
Loading