libminc: cleanup tests

This commit is contained in:
Jan Malakhovski 2018-08-08 18:48:44 +00:00
parent f01ff6545d
commit 86999f6883

View File

@ -14,21 +14,26 @@ stdenv.mkDerivation rec {
sha256 = "0mn4n3ihzcr1jw2g1vy6c8p4lkc88jwljk04argmj7k4djrgpxpa"; sha256 = "0mn4n3ihzcr1jw2g1vy6c8p4lkc88jwljk04argmj7k4djrgpxpa";
}; };
postPatch = ''
patchShebangs .
'';
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ zlib netcdf nifticlib hdf5 ]; buildInputs = [ zlib netcdf nifticlib hdf5 ];
cmakeFlags = [ "-DBUILD_TESTING=${if doCheck then "TRUE" else "FALSE"}" cmakeFlags = [
"-DLIBMINC_MINC1_SUPPORT=TRUE" "-DBUILD_TESTING=${if doCheck then "ON" else "OFF"}"
"-DLIBMINC_BUILD_SHARED_LIBS=TRUE" "-DLIBMINC_MINC1_SUPPORT=ON"
"-DLIBMINC_USE_SYSTEM_NIFTI=TRUE" ]; "-DLIBMINC_BUILD_SHARED_LIBS=ON"
"-DLIBMINC_USE_SYSTEM_NIFTI=ON"
];
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
checkPhase = '' checkPhase = ''
export LD_LIBRARY_PATH="$(pwd)" # see #22060 export LD_LIBRARY_PATH="$(pwd)" # see #22060
ctest -E 'ezminc_rw_test|minc_conversion' --output-on-failure ctest -E 'ezminc_rw_test|minc_conversion' --output-on-failure
# ezminc_rw_test can't find libminc_io.so.5.2.0; minc_conversion hits netcdf compilation issue # ezminc_rw_test can't find libminc_io.so.5.2.0; minc_conversion hits netcdf compilation issue
''; '';
doCheck = true;
enableParallelBuilding = true; enableParallelBuilding = true;