зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1587390 [wpt PR 19595] - Switch WebKitGTK testing to Ubuntu and add a nightly channel, a=testonly
Automatic update from web-platform-tests Switch WebKitGTK testing to Ubuntu (harmonize docker based testing) (#19595) Previously a Dockerfile based on Debian was added for WebKitGTK testing with the idea of reusing the built products that build.webkit.org is producing. That was done with the idea of having dozens of new nightly builds available at a day, which doesn't seem to match the needs for WPT testing/runs. It seems that having one new nightly a day (or even two a week) is more than enough. At that rate is more than reasonable to do new builds for testing with Ubuntu 18.04. And it seems that harmonizing the testing of the Linux based browsers on the same docker image has several benefits, including making easier future maintenance. This switchs the WebKitGTK testing to using Ubuntu 18.04. -- Add a nightly channel for testing with WebKitGTK on taskcluster. (#19595) The nighly channel downloads the last nightly tarball available at https://webkitgtk.org/built-products and installs it on taskcluster when the test start. This tarball is generated using the webkitgtk internal JHBuild, that builds several third-party libraries needed for webkitgtk layout tests and then builds webkitgtk on top of this libraries. Because of this using this tarball requires installing quite a lot of extra dependencies (that are needed by this extra third-party libraries). A script is included inside the tarball to install this dependencies. -- wpt-commits: 0caf257227379666f62c717d1b3ac2319659d315, 60d0c91c095561dea605458044b55f52a8f14b79 wpt-pr: 19595
This commit is contained in:
Родитель
42cfbafdea
Коммит
e9007f5709
|
@ -12,15 +12,16 @@ tasks:
|
|||
$flatten:
|
||||
$match: {
|
||||
event.ref == "refs/heads/master": [{name: firefox, channel: nightly}, {name: chrome, channel: dev}],
|
||||
event.ref == "refs/heads/epochs/daily": [{name: firefox, channel: stable}, {name: chrome, channel: stable}, {name: webkitgtk_minibrowser, channel: stable}],
|
||||
event.ref == "refs/heads/epochs/weekly": [{name: firefox, channel: beta}, {name: chrome, channel: beta}],
|
||||
event.ref == "refs/heads/epochs/daily": [{name: firefox, channel: stable}, {name: chrome, channel: stable}, {name: webkitgtk_minibrowser, channel: nightly}],
|
||||
event.ref == "refs/heads/epochs/weekly": [{name: firefox, channel: beta}, {name: chrome, channel: beta}, {name: webkitgtk_minibrowser, channel: stable}],
|
||||
event.ref == "refs/heads/triggers/chrome_stable": [{name: chrome, channel: stable}],
|
||||
event.ref == "refs/heads/triggers/chrome_beta": [{name: chrome, channel: beta}],
|
||||
event.ref == "refs/heads/triggers/chrome_dev": [{name: chrome, channel: dev}],
|
||||
event.ref == "refs/heads/triggers/firefox_stable": [{name: firefox, channel: stable}],
|
||||
event.ref == "refs/heads/triggers/firefox_beta": [{name: firefox, channel: beta}],
|
||||
event.ref == "refs/heads/triggers/firefox_nightly": [{name: firefox, channel: nightly}],
|
||||
event.ref == "refs/heads/triggers/webkitgtk_minibrowser_stable": [{name: webkitgtk_minibrowser, channel: stable}]
|
||||
event.ref == "refs/heads/triggers/webkitgtk_minibrowser_stable": [{name: webkitgtk_minibrowser, channel: stable}],
|
||||
event.ref == "refs/heads/triggers/webkitgtk_minibrowser_nightly": [{name: webkitgtk_minibrowser, channel: nightly}]
|
||||
}
|
||||
each(browser):
|
||||
$map:
|
||||
|
@ -72,10 +73,6 @@ tasks:
|
|||
source: ${event.repository.url}
|
||||
payload:
|
||||
image:
|
||||
$if: browser.name == 'webkitgtk_minibrowser'
|
||||
then:
|
||||
cl0p3z/web-platform-tests:0.1
|
||||
else:
|
||||
harjgam/web-platform-tests:0.33
|
||||
maxRunTime: 7200
|
||||
artifacts:
|
||||
|
|
|
@ -41,6 +41,7 @@ import os
|
|||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
try:
|
||||
from urllib2 import urlopen
|
||||
except ImportError:
|
||||
|
@ -149,20 +150,35 @@ def install_webkitgtk_from_apt_repository(channel):
|
|||
# Configure webkitgtk.org/debian repository for $channel and pin it with maximum priority
|
||||
run(["sudo", "apt-key", "adv", "--fetch-keys", "https://webkitgtk.org/debian/apt.key"])
|
||||
with open("/tmp/webkitgtk.list", "w") as f:
|
||||
f.write("deb [arch=amd64] https://webkitgtk.org/debian buster-wpt-webkit-updates %s\n" % channel)
|
||||
f.write("deb [arch=amd64] https://webkitgtk.org/apt bionic-wpt-webkit-updates %s\n" % channel)
|
||||
run(["sudo", "mv", "/tmp/webkitgtk.list", "/etc/apt/sources.list.d/"])
|
||||
with open("/tmp/99webkitgtk", "w") as f:
|
||||
f.write("Package: *\nPin: origin webkitgtk.org\nPin-Priority: 1999\n")
|
||||
run(["sudo", "mv", "/tmp/99webkitgtk", "/etc/apt/preferences.d/"])
|
||||
# Install webkit2gtk from the webkitgtk.org/debian repository for $channel
|
||||
# Install webkit2gtk from the webkitgtk.org/apt repository for $channel
|
||||
run(["sudo", "apt-get", "-qqy", "update"])
|
||||
run(["sudo", "apt-get", "-qqy", "upgrade"])
|
||||
run(["sudo", "apt-get", "-qqy", "-t", "buster-wpt-webkit-updates", "install", "webkit2gtk-driver"])
|
||||
run(["sudo", "apt-get", "-qqy", "-t", "bionic-wpt-webkit-updates", "install", "webkit2gtk-driver"])
|
||||
|
||||
|
||||
def install_webkitgtk_from_tarball_bundle(channel):
|
||||
with tempfile.NamedTemporaryFile(suffix=".tar.xz") as temp_tarball:
|
||||
resp = urlopen("https://webkitgtk.org/built-products/nightly/webkitgtk-nightly-build-last.tar.xz")
|
||||
while True:
|
||||
chunk = resp.read(16*1024)
|
||||
if not chunk:
|
||||
break
|
||||
temp_tarball.write(chunk)
|
||||
temp_tarball.flush()
|
||||
run(["sudo", "tar", "xfa", temp_tarball.name, "-C", "/"])
|
||||
# Install dependencies
|
||||
run(["sudo", "apt-get", "-qqy", "update"])
|
||||
run(["sudo", "/opt/webkitgtk/nightly/install-dependencies"])
|
||||
|
||||
|
||||
def install_webkitgtk(channel):
|
||||
if channel in ("experimental", "dev", "nightly"):
|
||||
raise NotImplementedError("Still can't install from release channel: %s" % channel)
|
||||
install_webkitgtk_from_tarball_bundle(channel)
|
||||
elif channel in ("beta", "stable"):
|
||||
install_webkitgtk_from_apt_repository(channel)
|
||||
else:
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
# This image for WebKitGTK tests is based on Debian stable to ensure binary
|
||||
# compatibility with ToT/trunk built-products from build.webkit.org bots.
|
||||
# See https://github.com/web-platform-tests/wpt/pull/18595#issuecomment-537267080
|
||||
FROM debian:10
|
||||
|
||||
# No interactive frontend during docker build
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
|
||||
|
||||
# Update and upgrade.
|
||||
RUN apt-get -qqy update \
|
||||
&& apt-get -qqy upgrade
|
||||
|
||||
# Install general requirements not in the base image
|
||||
RUN apt-get -qqy install \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
dbus-x11 \
|
||||
earlyoom \
|
||||
fluxbox \
|
||||
gdebi \
|
||||
git \
|
||||
locales \
|
||||
pulseaudio \
|
||||
python \
|
||||
python-pip \
|
||||
python-virtualenv \
|
||||
tzdata \
|
||||
sudo \
|
||||
unzip \
|
||||
wget \
|
||||
xvfb \
|
||||
git-core
|
||||
|
||||
|
||||
# To speed up testers, cache in the image most of WebKitGTK dependencies
|
||||
# but don't install them (that will be done at test time)
|
||||
RUN apt-get install -qqy --download-only webkit2gtk-driver
|
||||
|
||||
# Set the timezone
|
||||
ENV TZ "UTC"
|
||||
RUN echo "${TZ}" > /etc/timezone \
|
||||
&& dpkg-reconfigure --frontend noninteractive tzdata
|
||||
|
||||
# Set the locale
|
||||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
|
||||
&& dpkg-reconfigure --frontend noninteractive locales
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LANGUAGE en_US:en
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
RUN useradd test \
|
||||
--shell /bin/bash \
|
||||
--create-home \
|
||||
&& usermod -a -G sudo test \
|
||||
&& echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers \
|
||||
&& echo 'test:secret' | chpasswd
|
||||
|
||||
ENV SCREEN_WIDTH 1280
|
||||
ENV SCREEN_HEIGHT 1024
|
||||
ENV SCREEN_DEPTH 24
|
||||
ENV DISPLAY :99.0
|
||||
|
||||
USER test
|
||||
|
||||
WORKDIR /home/test
|
||||
|
||||
# Remove information on how to use sudo on login
|
||||
RUN sudo echo ""
|
||||
|
||||
RUN mkdir -p /home/test/artifacts
|
||||
RUN mkdir -p /home/test/bin
|
||||
|
||||
ENV PATH="/home/test/bin:/home/test/.local/bin:${PATH}"
|
||||
|
||||
WORKDIR /home/test/
|
||||
|
||||
COPY .bashrc /home/test/.bashrc
|
||||
|
||||
COPY start.sh /home/test/start.sh
|
||||
COPY retry.py /home/test/bin/retry
|
|
@ -1,6 +1,6 @@
|
|||
This docker images is used for testing Chrome, Firefox and running other tasks
|
||||
on Taskcluster. When any of the files in this directory change, the images must
|
||||
be updated as well. To do this, assuming you have docker installed:
|
||||
This docker images is used for testing Chrome, Firefox, WebKitGTK and running
|
||||
other tasks on Taskcluster. When any of the files in this directory change, the
|
||||
images must be updated as well. To do this, assuming you have docker installed:
|
||||
|
||||
In this directory, run
|
||||
```sh
|
||||
|
@ -8,10 +8,3 @@ docker build -t <tag> .
|
|||
docker push <tag>
|
||||
```
|
||||
|
||||
Then update the `image` specified in the project's .taskcluster.yml file.
|
||||
|
||||
To update the image used for WebKitGTK:
|
||||
```sh
|
||||
docker build -f Dockerfile.webkitgtk -t <tag> .
|
||||
docker push <tag>
|
||||
```
|
||||
|
|
|
@ -1118,10 +1118,15 @@ class WebKitGTKMiniBrowser(WebKit):
|
|||
pass
|
||||
# Add Debian/Ubuntu path
|
||||
libexecpaths.append("/usr/lib/%s/webkit2gtk-4.0" % triplet)
|
||||
if channel == "nightly":
|
||||
libexecpaths.append("/opt/webkitgtk/nightly")
|
||||
return find_executable("MiniBrowser", os.pathsep.join(libexecpaths))
|
||||
|
||||
def find_webdriver(self, channel=None):
|
||||
return find_executable("WebKitWebDriver")
|
||||
path = os.environ['PATH']
|
||||
if channel == "nightly":
|
||||
path = "%s:%s" % (path, "/opt/webkitgtk/nightly")
|
||||
return find_executable("WebKitWebDriver", path)
|
||||
|
||||
def version(self, binary=None, webdriver_binary=None):
|
||||
if binary is None:
|
||||
|
|
|
@ -592,14 +592,14 @@ class WebKitGTKMiniBrowser(BrowserSetup):
|
|||
|
||||
def setup_kwargs(self, kwargs):
|
||||
if kwargs["binary"] is None:
|
||||
binary = self.browser.find_binary()
|
||||
binary = self.browser.find_binary(channel=kwargs["browser_channel"])
|
||||
|
||||
if binary is None:
|
||||
raise WptrunError("Unable to find MiniBrowser binary")
|
||||
kwargs["binary"] = binary
|
||||
|
||||
if kwargs["webdriver_binary"] is None:
|
||||
webdriver_binary = self.browser.find_webdriver()
|
||||
webdriver_binary = self.browser.find_webdriver(channel=kwargs["browser_channel"])
|
||||
|
||||
if webdriver_binary is None:
|
||||
raise WptrunError("Unable to find WebKitWebDriver in PATH")
|
||||
|
|
|
@ -43,9 +43,13 @@ def test_safari_version_errors(mocked_check_output):
|
|||
def test_webkitgtk_minibrowser_version(mocked_check_output):
|
||||
webkitgtk_minibrowser = browser.WebKitGTKMiniBrowser(logger)
|
||||
|
||||
# stable version
|
||||
mocked_check_output.return_value = 'WebKitGTK 2.26.1\n'
|
||||
assert webkitgtk_minibrowser.version(binary='MiniBrowser') == '2.26.1'
|
||||
|
||||
# nightly version
|
||||
mocked_check_output.return_value = 'WebKitGTK 2.27.1 (r250823)\n'
|
||||
assert webkitgtk_minibrowser.version(binary='MiniBrowser') == '2.27.1 (r250823)'
|
||||
|
||||
@mock.patch('subprocess.check_output')
|
||||
def test_webkitgtk_minibrowser_version_errors(mocked_check_output):
|
||||
|
|
Загрузка…
Ссылка в новой задаче