tests: functional: Make install script work for Bullseye

- Pip option --break-system-packages is available only from Bookworm.

- Remove --user to that the script works can be used broadly.

Tests:

- On a fresh stable container, running functional tests works. Without the
patch, it fails.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2023-04-02 14:37:06 +05:30 committed by James Valleroy
parent 2cd693e3e6
commit 4cfc2fb4f2
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -8,7 +8,10 @@ sudo apt-get install -yq --no-install-recommends \
python3-pip python3-wheel firefox-esr git smbclient
# Use compatible versions of Splinter and Selenium
pip3 install --user --break-system-packages selenium==4.2.0 splinter==0.17.0 pytest-splinter pytest-reporter-html1
PIP_VERSION=$(dpkg-query -W -f '${Version}' python3-pip)
PIP_OPTIONS=
dpkg --compare-versions 23 \<= $PIP_VERSION && PIP_OPTIONS=--break-system-packages
pip3 install $PIP_OPTIONS selenium==4.2.0 splinter==0.17.0 pytest-splinter pytest-reporter-html1
echo "Installing geckodriver"
(