- Disable server async tests. It's just too flaky on obs

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-panel?expand=0&rev=64
This commit is contained in:
Benjamin Greiner 2024-11-28 12:19:00 +00:00 committed by Git OBS Bridge
parent 28d24e7d34
commit 9bab13c47a
2 changed files with 20 additions and 16 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Nov 28 12:05:47 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Disable server async tests. It's just too flaky on obs
-------------------------------------------------------------------
Wed Nov 27 16:03:51 UTC 2024 - Ben Greiner <code@bnavigator.de>

View File

@ -25,6 +25,9 @@
%bcond_with test
%endif
# too flaky server-side. Test it locally
%bcond_with servertests
# truncate trailing suffix
%define distversion 1.5.4
Name: python-panel%{psuffix}
@ -131,6 +134,7 @@ to all Python flavors.
%autosetup -p1 -n panel-%{version}
# no color for pytest
sed -i '/addopts/ s/--color=yes//' pyproject.toml
sed -i /asyncio_default_fixture_loop_scope/d pyproject.toml
rm panel/.eslintrc.js
for p in panel/tests/io/reload_module.py
do \
@ -142,7 +146,7 @@ pushd panel
rm package-lock.json
local-npm-registry %{_sourcedir} install --include=dev --include=peer
popd
sed -i /asyncio_default_fixture_loop_scope/d pyproject.toml
%if ! %{with test}
%build
@ -157,25 +161,20 @@ sed -i /asyncio_default_fixture_loop_scope/d pyproject.toml
%if %{with test}
%check
export PYTEST_DEBUG_TEMPROOT=$(mktemp -d -p ./)
# flaky async tests
donttest="test_server_async_callbacks"
donttest="$donttest or test_get_server"
donttest="$donttest or test_server_update"
# flaky timeout
donttest="$donttest or test_server_thread_pool_change_event or test_server_on_load_after_init"
# upstream skips it for win and osx, we skip it because it (flakily) terminates everything on aarch64
donttest="$donttest or (test_terminal and test_subprocess)"
# file sample.pdf missing
donttest="$donttest or test_pdf_local_file"
# (very) flaky async test: loop already running
# Don't test on 32-bit: asyncio is too flaky
[ $(getconf LONG_BIT) -eq 32 ] && exit 0
# test_compile tries to build and write next to the imported module: permission denied
export PYTHONPATH=":x"
# no network connection in obs
deselectmark=(-m "not internet")
# no multiflavor playwright
ignorefiles=(--ignore scripts/panelite/test/test_utils.py --ignore scripts/panelite/test/test_panelite.py)
# test_compile tries to build and write next to the imported module: permission denied
PYTHONPATH=":x"
# upstream skips it for win and osx, we skip it because it (flakily) terminates everything on aarch64
donttest="(test_terminal and test_subprocess)"
# file sample.pdf missing
donttest="$donttest or test_pdf_local_file"
%if !%{with servertests}
# flaky async tests
donttest="$donttest or test_server"
%endif
%pytest -n auto -rsfE -k "not ($donttest)" "${deselectmark[@]}" "${ignorefiles[@]}" -p no:unraisableexception
%endif