summary refs log tree commit diff
diff options
context:
space:
mode:
authorHarrison Houghton <hora.rhino@gmail.com>2021-08-21 12:07:55 -0400
committerHarrison Houghton <hora.rhino@gmail.com>2021-08-22 00:01:38 -0400
commitb6266dce644ea6ed47445b36c88e5cf23a6e7fb8 (patch)
tree3c3c9a0c08ded80eeb4444feec51c83337a8e3d7
parent9d71711aec86ea6434c22bee80c02506bfe2d305 (diff)
downloadnixpkgs-b6266dce644ea6ed47445b36c88e5cf23a6e7fb8.tar
nixpkgs-b6266dce644ea6ed47445b36c88e5cf23a6e7fb8.tar.gz
nixpkgs-b6266dce644ea6ed47445b36c88e5cf23a6e7fb8.tar.bz2
nixpkgs-b6266dce644ea6ed47445b36c88e5cf23a6e7fb8.tar.lz
nixpkgs-b6266dce644ea6ed47445b36c88e5cf23a6e7fb8.tar.xz
nixpkgs-b6266dce644ea6ed47445b36c88e5cf23a6e7fb8.tar.zst
nixpkgs-b6266dce644ea6ed47445b36c88e5cf23a6e7fb8.zip
zeroc-ice: enable tests
The previous version said "no tests; they require network", which is not
true for most tests. Just disable the ones that need it and run those
that don't; some is better than none, right?
-rw-r--r--pkgs/development/libraries/zeroc-ice/default.nix18
1 files changed, 16 insertions, 2 deletions
diff --git a/pkgs/development/libraries/zeroc-ice/default.nix b/pkgs/development/libraries/zeroc-ice/default.nix
index 26a2ebf223f..fcd83634855 100644
--- a/pkgs/development/libraries/zeroc-ice/default.nix
+++ b/pkgs/development/libraries/zeroc-ice/default.nix
@@ -1,6 +1,7 @@
 { stdenv, lib, fetchFromGitHub
 , bzip2, expat, libedit, lmdb, openssl
 , darwin, libiconv, Security
+, python3 # for tests only
 , cpp11 ? false
 }:
 
@@ -52,12 +53,25 @@ in stdenv.mkDerivation rec {
     )
   '';
 
-  buildFlags = [ "srcs" ]; # no tests; they require network
-
   enableParallelBuilding = true;
 
   outputs = [ "out" "bin" "dev" ];
 
+  doCheck = true;
+  checkInputs = with python3.pkgs; [ passlib ];
+  checkPhase = with lib; let
+    # these tests require network access so we need to skip them.
+    brokenTests = map escapeRegex [
+      "Ice/udp" "Glacier2" "IceGrid/simple" "IceStorm" "IceDiscovery/simple"
+    ];
+    # matches CONFIGS flag in makeFlagsArray
+    configFlag = optionalString cpp11 "--config=cpp11-shared";
+  in ''
+    runHook preCheck
+    ${python3.interpreter} ./cpp/allTests.py ${configFlag} --rfilter='${concatStringsSep "|" brokenTests}'
+    runHook postCheck
+  '';
+
   postInstall = ''
     mkdir -p $bin $dev/share
     mv $out/bin $bin