fmf: Run tests with firefox

Chromium has started to crash in current Fedora, and is not easily
available in RHEL.

Install bzip2 to unpack the nightly tarball.
This commit is contained in:
Martin Pitt 2021-10-07 09:15:46 +02:00 committed by Matej Marusak
parent 11da2d284b
commit 0bc01714ee
2 changed files with 8 additions and 10 deletions

View file

@ -12,15 +12,12 @@ LOGS="$(pwd)/logs"
mkdir -p "$LOGS"
chmod a+w "$LOGS"
# install browser; on RHEL, use chromium from epel
# HACK: chromium-headless ought to be enough, but version 88 has a crash: https://bugs.chromium.org/p/chromium/issues/detail?id=1170634
if ! rpm -q chromium; then
if grep -q 'ID=.*rhel' /etc/os-release; then
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf config-manager --enable epel
fi
dnf install -y chromium
fi
# install firefox (available everywhere in Fedora and RHEL); install the package to pull in all the dependencies
# we don't need the H.264 codec, and it is sometimes not available (rhbz#2005760)
dnf install --disablerepo=fedora-cisco-openh264 -y firefox
# install nightly for Chrome DevTools Protocol support
curl --location 'https://download.mozilla.org/?product=firefox-nightly-latest-ssl&os=linux64&lang=en-US' | tar -C /usr/local/lib/ -xj
ln -s /usr/local/lib/firefox/firefox /usr/local/bin/
# create user account for logging in
if ! id admin 2>/dev/null; then
@ -50,7 +47,7 @@ echo core > /proc/sys/kernel/core_pattern
systemctl enable --now cockpit.socket
# Run tests as unprivileged user
su - -c "env SOURCE=$SOURCE LOGS=$LOGS $TESTS/run-test.sh" runtest
su - -c "env TEST_BROWSER=firefox SOURCE=$SOURCE LOGS=$LOGS $TESTS/run-test.sh" runtest
RC=$(cat $LOGS/exitcode)
exit ${RC:-1}

View file

@ -4,6 +4,7 @@ require:
- cockpit-starter-kit
- cockpit-ws
- cockpit-system
- bzip2
- git
- glibc-langpack-de
- libvirt-python3