From 96f1ccb47f7e4618270b9908234bdd756c3d265d5c8e0cbd80e9d5f51ebf0f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 27 Nov 2018 11:22:06 +0000 Subject: [PATCH] - Make sure the tests are run OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-xlib?expand=0&rev=4 --- python-python-xlib.changes | 5 +++++ python-python-xlib.spec | 18 ++++-------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/python-python-xlib.changes b/python-python-xlib.changes index 3564a92..37534cc 100644 --- a/python-python-xlib.changes +++ b/python-python-xlib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 27 11:21:53 UTC 2018 - Tomáš Chvátal + +- Make sure the tests are run + ------------------------------------------------------------------- Tue Nov 27 09:04:39 UTC 2018 - sor.alexei@meowr.ru diff --git a/python-python-xlib.spec b/python-python-xlib.spec index 4919534..393f972 100644 --- a/python-python-xlib.spec +++ b/python-python-xlib.spec @@ -17,9 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define X_display ":98" %define oldpython python -%bcond_with test Name: python-python-xlib Version: 0.23 Release: 0 @@ -28,17 +26,16 @@ License: LGPL-2.1-or-later Group: Development/Libraries/Python URL: https://github.com/python-xlib/python-xlib Source: https://files.pythonhosted.org/packages/source/p/python-xlib/python-xlib-%{version}.tar.bz2 -BuildRequires: %{python_module devel} +BuildRequires: %{python_module mock} +BuildRequires: %{python_module nose} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six >= 1.10.0} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: xvfb-run Requires: python-six >= 1.10.0 BuildArch: noarch -%if %{with test} -BuildRequires: xorg-x11-server -%endif %ifpython2 Provides: %{oldpython}-xlib = %{version} Obsoletes: %{oldpython}-xlib < %{version} @@ -57,21 +54,14 @@ library for Python programs. %setup -q -n python-xlib-%{version} %build -export CFLAGS="%{optflags}" %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if %{with test} %check -export DISPLAY=%{X_display} -Xvfb %{X_display} >& Xvfb.log & -trap "kill $! || true" EXIT -sleep 10 -%python_exec runtests.py -%endif +%python_expand xvfb-run --server-args "-screen 0 1920x1080x24" $python runtests.py %files %{python_files} %license LICENSE