mirror of
https://github.com/searxng/searxng.git
synced 2025-02-22 06:46:16 +00:00
[fix] selenium: binary is not a Firefox executable
Since Ubuntu installs firefox frrom snap, we can't use any longer ``Browser('firefox')``. [1] https://github.com/searxng/searxng/pull/3663#issuecomment-2255963036 [2] https://splinter.readthedocs.io/en/latest/drivers/firefox.html#custom-binary-path Suggested-by: @allendema Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
8c610404bd
commit
d45dea56c5
3 changed files with 7 additions and 18 deletions
15
.github/workflows/integration.yml
vendored
15
.github/workflows/integration.yml
vendored
|
@ -23,26 +23,11 @@ jobs:
|
||||||
- name: Install Ubuntu packages
|
- name: Install Ubuntu packages
|
||||||
run: |
|
run: |
|
||||||
sudo ./utils/searxng.sh install packages
|
sudo ./utils/searxng.sh install packages
|
||||||
sudo apt install firefox
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
architecture: 'x64'
|
architecture: 'x64'
|
||||||
- name: Cache Python dependencies
|
|
||||||
id: cache-python
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
./local
|
|
||||||
./.nvm
|
|
||||||
./node_modules
|
|
||||||
key: python-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements*.txt', 'setup.py') }}
|
|
||||||
- name: Install Python dependencies
|
|
||||||
if: steps.cache-python.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
make V=1 install
|
|
||||||
make V=1 gecko.driver
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: make V=1 ci.test
|
run: make V=1 ci.test
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import traceback
|
import traceback
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import shutil
|
||||||
|
|
||||||
from splinter import Browser
|
from splinter import Browser
|
||||||
|
|
||||||
|
@ -53,6 +54,9 @@ class SearxRobotLayer:
|
||||||
|
|
||||||
def run_robot_tests(tests):
|
def run_robot_tests(tests):
|
||||||
print('Running {0} tests'.format(len(tests)))
|
print('Running {0} tests'.format(len(tests)))
|
||||||
|
print(f'{shutil.which("geckodriver")}')
|
||||||
|
print(f'{shutil.which("firefox")}')
|
||||||
|
|
||||||
for test in tests:
|
for test in tests:
|
||||||
with Browser('firefox', headless=True, profile_preferences={'intl.accept_languages': 'en'}) as browser:
|
with Browser('firefox', headless=True, profile_preferences={'intl.accept_languages': 'en'}) as browser:
|
||||||
test(browser)
|
test(browser)
|
||||||
|
|
|
@ -62,7 +62,7 @@ uwsgi uwsgi-plugin-python3
|
||||||
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev"
|
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev"
|
||||||
|
|
||||||
SEARXNG_BUILD_PACKAGES_debian="\
|
SEARXNG_BUILD_PACKAGES_debian="\
|
||||||
firefox graphviz imagemagick texlive-xetex librsvg2-bin
|
graphviz imagemagick texlive-xetex librsvg2-bin
|
||||||
texlive-latex-recommended texlive-extra-utils fonts-dejavu
|
texlive-latex-recommended texlive-extra-utils fonts-dejavu
|
||||||
latexmk shellcheck"
|
latexmk shellcheck"
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ uwsgi uwsgi-plugin-python
|
||||||
git base-devel libxml2"
|
git base-devel libxml2"
|
||||||
|
|
||||||
SEARXNG_BUILD_PACKAGES_arch="\
|
SEARXNG_BUILD_PACKAGES_arch="\
|
||||||
firefox graphviz imagemagick texlive-bin extra/librsvg
|
graphviz imagemagick texlive-bin extra/librsvg
|
||||||
texlive-core texlive-latexextra ttf-dejavu shellcheck"
|
texlive-core texlive-latexextra ttf-dejavu shellcheck"
|
||||||
|
|
||||||
# dnf packages
|
# dnf packages
|
||||||
|
@ -85,7 +85,7 @@ uwsgi uwsgi-plugin-python3
|
||||||
git @development-tools libxml2 openssl"
|
git @development-tools libxml2 openssl"
|
||||||
|
|
||||||
SEARXNG_BUILD_PACKAGES_fedora="\
|
SEARXNG_BUILD_PACKAGES_fedora="\
|
||||||
firefox graphviz graphviz-gd ImageMagick librsvg2-tools
|
graphviz graphviz-gd ImageMagick librsvg2-tools
|
||||||
texlive-xetex-bin texlive-collection-fontsrecommended
|
texlive-xetex-bin texlive-collection-fontsrecommended
|
||||||
texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts
|
texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts
|
||||||
dejavu-sans-mono-fonts ShellCheck"
|
dejavu-sans-mono-fonts ShellCheck"
|
||||||
|
|
Loading…
Reference in a new issue