Unverified Commit 03aebfae authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #228811 from bcdarwin/gdcm-enable-tests

gdcm: enable tests
parents 16e060c0 99dac9d0
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
  cmakeFlags = [
    "-DGDCM_BUILD_APPLICATIONS=ON"
    "-DGDCM_BUILD_SHARED_LIBS=ON"
    "-DGDCM_BUILD_TESTING=ON"
    # hack around usual "`RUNTIME_DESTINATION` must not be an absolute path" issue:
    "-DCMAKE_INSTALL_LIBDIR=lib"
    "-DCMAKE_INSTALL_BINDIR=bin"
@@ -47,6 +48,28 @@ stdenv.mkDerivation rec {
    libiconv
  ] ++ lib.optionals enablePython [ swig python ];

  disabledTests = [
    # require networking:
    "TestEcho"
    "TestFind"
    "gdcmscu-echo-dicomserver"
    "gdcmscu-find-dicomserver"
    # seemingly ought to be be disabled when the test data submodule is not present:
    "TestvtkGDCMImageReader2_3"
    "TestSCUValidation"
    # errors because 3 classes not wrapped:
    "TestWrapPython"
  ];

  checkPhase = ''
    runHook preCheck
    ctest --exclude-regex '^(${lib.concatStringsSep "|" disabledTests})$'
    runHook postCheck
  '';
  doCheck = true;
  # note that when the test data is available to the build via `fetchSubmodules = true`,
  # a number of additional but much slower tests are enabled

  meta = with lib; {
    description = "The grassroots cross-platform DICOM implementation";
    longDescription = ''