]> git.pld-linux.org Git - packages/python-tdbus.git/commitdiff
Fix tests when running out of X11 session auto/th/python-tdbus-0.10-1
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 10 Nov 2017 08:33:57 +0000 (09:33 +0100)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 10 Nov 2017 08:33:57 +0000 (09:33 +0100)
Run local dbus-daemon instead of using user session.

python-tdbus.spec

index 7837c36f92c2505ecf65befd11d79d66156a32d5..4077631ea12d4a0b5a866ea0633902e5ae0f04d8 100644 (file)
@@ -27,6 +27,9 @@ BuildRequires:        python3-devel
 BuildRequires: python3-gevent
 BuildRequires: python3-setuptools
 %endif
+%if %{with tests}
+BuildRequires: /usr/bin/dbus-launch
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -87,6 +90,14 @@ Dokumentacja API %{module}.
 %patch0 -p1
 
 %build
+unset DISPLAY
+unset DBUS_SESSION_BUS_ADDRESS
+unset XDG_RUNTIME_DIR
+
+%if %{with tests}
+eval $(dbus-launch --sh-syntax)
+%endif
+
 %if %{with python2}
 %py_build %{?with_tests:test}
 %endif
This page took 0.112527 seconds and 4 git commands to generate.