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?
This commit is contained in:
Harrison Houghton 2021-08-21 12:07:55 -04:00
parent 9d71711aec
commit b6266dce64

View File

@ -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