forked from pool/python-PySDL2
- Add fix-tests.patch to fix the test run in the rpmbuild container without
access to /dev/input. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PySDL2?expand=0&rev=22
This commit is contained in:
@@ -25,6 +25,8 @@ Summary: Python ctypes wrapper around SDL2
|
||||
License: SUSE-Public-Domain
|
||||
URL: https://github.com/py-sdl/py-sdl2
|
||||
Source: https://files.pythonhosted.org/packages/source/P/PySDL2/PySDL2-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE fix-tests.patch to make test work in chroot env without access to /dev/input
|
||||
Patch0: fix-tests.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
@@ -68,21 +70,12 @@ sed -i 's/\r$//' AUTHORS.txt COPYING.txt README.md
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
#############################################
|
||||
### Launch a virtual framebuffer X server ###
|
||||
### (pytest-xvfb is not enough) ###
|
||||
#############################################
|
||||
export DISPLAY=%{X_display}
|
||||
Xvfb %{X_display} >& Xvfb.log &
|
||||
trap "kill $! || true" EXIT
|
||||
sleep 10
|
||||
|
||||
export SDL_VIDEODRIVER=dummy
|
||||
export SDL_AUDIODRIVER=dummy
|
||||
export SDL_RENDER_DRIVER=software
|
||||
export PYTHONFAULTHANDLER=1
|
||||
|
||||
%pytest -rfEs || :
|
||||
%pytest -rfEs
|
||||
|
||||
%files %{python_files}
|
||||
%license COPYING.txt
|
||||
|
Reference in New Issue
Block a user