summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-03-25 23:32:44 +0200
committeraszlig <aszlig@nix.build>2018-03-25 23:41:18 +0200
commitadb58440e687440ecf70d2571d8bba8d215dea6a (patch)
tree9598941766de3bc2256f9b6e738214d5c33d1bd2
parentc948613a6532eb4fdce0329c3f0d5af1857ac0d6 (diff)
downloadnixpkgs-adb58440e687440ecf70d2571d8bba8d215dea6a.tar
nixpkgs-adb58440e687440ecf70d2571d8bba8d215dea6a.tar.gz
nixpkgs-adb58440e687440ecf70d2571d8bba8d215dea6a.tar.bz2
nixpkgs-adb58440e687440ecf70d2571d8bba8d215dea6a.tar.lz
nixpkgs-adb58440e687440ecf70d2571d8bba8d215dea6a.tar.xz
nixpkgs-adb58440e687440ecf70d2571d8bba8d215dea6a.tar.zst
nixpkgs-adb58440e687440ecf70d2571d8bba8d215dea6a.zip
gajim: Re-enable tests
Just because the tests need GTK+, I think it's not a good idea to simply
disable them when we're still able to use an X virtual framebuffer to
run them anyway.

As with the package we had prior to version 1.0 I've disabled the
resolver test, because this one requires networking.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @abbradar, @Mic92, @7c6f434c
-rw-r--r--pkgs/applications/networking/instant-messengers/gajim/default.nix15
1 files changed, 11 insertions, 4 deletions
diff --git a/pkgs/applications/networking/instant-messengers/gajim/default.nix b/pkgs/applications/networking/instant-messengers/gajim/default.nix
index a60df1ead53..5a9f545bb0a 100644
--- a/pkgs/applications/networking/instant-messengers/gajim/default.nix
+++ b/pkgs/applications/networking/instant-messengers/gajim/default.nix
@@ -1,6 +1,7 @@
 { buildPythonApplication, lib, fetchurl, gettext, wrapGAppsHook
 , python, gtk3, gobjectIntrospection
 , nbxmpp, pyasn1, pygobject3, dbus-python, pillow
+, xvfb_run, dbus
 , enableJingle ? true, farstream, gstreamer, gst-plugins-base, gst-libav, gst-plugins-ugly
 , enableE2E ? true, pycrypto, python-gnupg
 , enableSecrets ? true, libsecret
@@ -23,6 +24,11 @@ buildPythonApplication rec {
     sha256 = "10da4imfldj04917h54vrmg70a1d832jd8p6386paa5jqzf5qk20";
   };
 
+  postPatch = ''
+    # This test requires network access
+    echo "" > test/integration/test_resolver.py
+  '';
+
   buildInputs = [
     gobjectIntrospection gtk3
   ] ++ optionals enableJingle [ farstream gstreamer gst-plugins-base gst-libav gst-plugins-ugly ]
@@ -41,13 +47,14 @@ buildPythonApplication rec {
     ++ optionals enableOmemoPluginDependencies [ python-axolotl qrcode ]
     ++ extraPythonPackages pythonPackages;
 
+  checkInputs = [ xvfb_run dbus.daemon ];
+
   checkPhase = ''
-    ${python.interpreter} test/runtests.py
+    xvfb-run dbus-run-session \
+      --config-file=${dbus.daemon}/share/dbus-1/session.conf \
+      ${python.interpreter} test/runtests.py
   '';
 
-  # Tests try to use GTK+ which fails.
-  doCheck = false;
-
   meta = {
     homepage = http://gajim.org/;
     description = "Jabber client written in PyGTK";