From 397661e49959a67a8bb4432b7b026f132a8adaef Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 26 Oct 2025 10:06:24 +0000 Subject: [PATCH 1/2] calibre refactor test skipping code --- pkgs/by-name/ca/calibre/package.nix | 48 +++++++++++++++++------------ 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/pkgs/by-name/ca/calibre/package.nix b/pkgs/by-name/ca/calibre/package.nix index 56642f9be070..c3a560e19f79 100644 --- a/pkgs/by-name/ca/calibre/package.nix +++ b/pkgs/by-name/ca/calibre/package.nix @@ -221,29 +221,39 @@ 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.optionals (!unrarSupport) [ + "test_unrar" + ]; - ${lib.optionalString stdenv.hostPlatform.isAarch64 "$ETN 'test_piper'"} # https://github.com/microsoft/onnxruntime/issues/10038 - ${lib.optionalString (!unrarSupport) "$ETN 'test_unrar'"} - ) + testFlags = lib.concatStringsSep " " ( + lib.map (testName: "--exclude-test-name ${testName}") excludedTestNames + ); + in + '' + runHook preInstallCheck - python setup.py test ''${EXCLUDED_FLAGS[@]} + python setup.py test ${testFlags} - runHook postInstallCheck - ''; + runHook postInstallCheck + ''; passthru.updateScript = nix-update-script { extraArgs = [ "--url=https://github.com/kovidgoyal/calibre" ]; From 59c8a1e672b7eb4b151adc15f41906d89b900bc1 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 26 Oct 2025 10:06:41 +0000 Subject: [PATCH 2/2] calibre: skip crashing test on aarch64-linux --- pkgs/by-name/ca/calibre/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/ca/calibre/package.nix b/pkgs/by-name/ca/calibre/package.nix index c3a560e19f79..eaad1cb706c1 100644 --- a/pkgs/by-name/ca/calibre/package.nix +++ b/pkgs/by-name/ca/calibre/package.nix @@ -238,6 +238,12 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals stdenv.hostPlatform.isAarch64 [ # https://github.com/microsoft/onnxruntime/issues/10038 "test_piper" + + # 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"