thrift: ctestCheckHook

This commit is contained in:
Guilhem Saurel
2025-09-23 09:30:37 +02:00
parent 920d6e9acf
commit 791d9f749f
+7 -8
View File
@@ -11,6 +11,7 @@
pkg-config,
bison,
flex,
ctestCheckHook,
static ? stdenv.hostPlatform.isStatic,
}:
@@ -59,6 +60,8 @@ stdenv.mkDerivation (finalAttrs: {
zlib
];
nativeCheckInputs = [ ctestCheckHook ];
preConfigure = ''
export PY_PREFIX=$out
'';
@@ -74,16 +77,12 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeBool "BUILD_TESTING" (!static))
];
disabledTests = [
"UnitTests" # getaddrinfo() -> -3; Temporary failure in name resolution
"python_test" # many failures about python 2 or network things
];
doCheck = !static;
checkPhase = ''
runHook preCheck
${lib.optionalString stdenv.hostPlatform.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/lib ctest -E "($(echo "$disabledTests" | tr " " "|"))"
runHook postCheck
'';
enableParallelChecking = false;
meta = with lib; {