diff --git a/pkgs/by-name/ca/calibre/package.nix b/pkgs/by-name/ca/calibre/package.nix index 56642f9be070..eaad1cb706c1 100644 --- a/pkgs/by-name/ca/calibre/package.nix +++ b/pkgs/by-name/ca/calibre/package.nix @@ -221,29 +221,45 @@ stdenv.mkDerivation (finalAttrs: { installCheckInputs = with python3Packages; [ psutil ]; - installCheckPhase = '' - runHook preInstallCheck + installCheckPhase = + let + excludedTestNames = [ + "test_7z" # we don't include 7z support + "test_zstd" # we don't include zstd support + "test_qt" # we don't include svg or webp support + "test_import_of_all_python_modules" # explores actual file paths, gets confused + "test_websocket_basic" # flaky - ETN='--exclude-test-name' - EXCLUDED_FLAGS=( - $ETN 'test_7z' # we don't include 7z support - $ETN 'test_zstd' # we don't include zstd support - $ETN 'test_qt' # we don't include svg or webp support - $ETN 'test_import_of_all_python_modules' # explores actual file paths, gets confused - $ETN 'test_websocket_basic' # flakey - # hangs with cuda enabled, also: - # eglInitialize: Failed to get system egl display - # Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory - $ETN 'test_recipe_browser_webengine' + # hangs with cuda enabled, also: + # eglInitialize: Failed to get system egl display + # Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory + "test_recipe_browser_webengine" + ] + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ + # https://github.com/microsoft/onnxruntime/issues/10038 + "test_piper" - ${lib.optionalString stdenv.hostPlatform.isAarch64 "$ETN 'test_piper'"} # https://github.com/microsoft/onnxruntime/issues/10038 - ${lib.optionalString (!unrarSupport) "$ETN 'test_unrar'"} - ) + # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' + # what(): /build/source/include/onnxruntime/core/common/logging/logging.h:371 + # static const onnxruntime::logging::Logger& onnxruntime::logging::LoggingManager::DefaultLogger() + # Attempt to use DefaultLogger but none has been registered. + "test_plugins" + ] + ++ lib.optionals (!unrarSupport) [ + "test_unrar" + ]; - python setup.py test ''${EXCLUDED_FLAGS[@]} + testFlags = lib.concatStringsSep " " ( + lib.map (testName: "--exclude-test-name ${testName}") excludedTestNames + ); + in + '' + runHook preInstallCheck - runHook postInstallCheck - ''; + python setup.py test ${testFlags} + + runHook postInstallCheck + ''; passthru.updateScript = nix-update-script { extraArgs = [ "--url=https://github.com/kovidgoyal/calibre" ];