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

View file

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