From e1147dbecd9421186e5c3cd49dfb43bca4d70667 Mon Sep 17 00:00:00 2001 From: Sergey Volkov Date: Wed, 29 Oct 2025 13:37:31 +0100 Subject: [PATCH] julia: move skipped tests from vendored patches to package code --- pkgs/development/compilers/julia/default.nix | 7 --- pkgs/development/compilers/julia/generic.nix | 43 +++++++++++++++++-- .../0002-skip-failing-and-flaky-tests.patch | 25 ----------- .../0002-skip-failing-and-flaky-tests.patch | 25 ----------- .../0001-skip-failing-and-flaky-tests.patch | 25 ----------- 5 files changed, 40 insertions(+), 85 deletions(-) delete mode 100644 pkgs/development/compilers/julia/patches/1.10/0002-skip-failing-and-flaky-tests.patch delete mode 100644 pkgs/development/compilers/julia/patches/1.11/0002-skip-failing-and-flaky-tests.patch delete mode 100644 pkgs/development/compilers/julia/patches/1.12/0001-skip-failing-and-flaky-tests.patch diff --git a/pkgs/development/compilers/julia/default.nix b/pkgs/development/compilers/julia/default.nix index a52a04df97d2..f59976263566 100644 --- a/pkgs/development/compilers/julia/default.nix +++ b/pkgs/development/compilers/julia/default.nix @@ -52,7 +52,6 @@ in version = "1.10.10"; hash = "sha256-/NTIGLlcNu4sI1rICa+PS/Jn+YnWi37zFBcbfMnv3Ys="; patches = [ - ./patches/1.10/0002-skip-failing-and-flaky-tests.patch # Revert https://github.com/JuliaLang/julia/pull/55354 # [build] Some improvements to the LLVM build system # Related: https://github.com/JuliaLang/julia/issues/55617 @@ -68,18 +67,12 @@ in callPackage (import ./generic.nix { version = "1.11.7"; hash = "sha256-puluy9YAV8kdx6mfwbN1F7Nhot+P0cRv/a0dm86Jln0="; - patches = [ - ./patches/1.11/0002-skip-failing-and-flaky-tests.patch - ]; }) { } ); julia_112 = wrapJulia ( callPackage (import ./generic.nix { version = "1.12.1"; hash = "sha256-iR0Wu5HIqU1aY1WoLBf6PCRY64kWDUKEQ6CyobhB6lI="; - patches = [ - ./patches/1.12/0001-skip-failing-and-flaky-tests.patch - ]; }) { } ); } diff --git a/pkgs/development/compilers/julia/generic.nix b/pkgs/development/compilers/julia/generic.nix index 270b2862ac45..d1a51e9994ef 100644 --- a/pkgs/development/compilers/julia/generic.nix +++ b/pkgs/development/compilers/julia/generic.nix @@ -1,7 +1,7 @@ { version, hash, - patches, + patches ? [ ], }: { @@ -21,6 +21,33 @@ buildPackages, }: +let + skip_tests = [ + # test flaky on ofborg + "channels" + # test flaky + "read" + "NetworkOptions" + "REPL" + "ccall" + ] + ++ lib.optionals (lib.versionAtLeast version "1.11") [ + "loading" + "cmdlineargs" + ] + ++ lib.optionals (lib.versionAtLeast version "1.12") [ + "Distributed" + # test flaky because of our RPATH patching + # https://github.com/NixOS/nixpkgs/pull/230965#issuecomment-1545336489 + "Compiler/codegen" + "precompile" + "compileall" + ] + ++ lib.optionals (lib.versionOlder version "1.12") [ + "compiler/codegen" # older versions' test was in lowercase + ]; +in + stdenv.mkDerivation rec { pname = "julia"; @@ -93,8 +120,6 @@ stdenv.mkDerivation rec { # tests are flaky for aarch64-linux on hydra doInstallCheck = if (lib.versionOlder version "1.10") then !stdenv.hostPlatform.isAarch64 else true; - installCheckTarget = "testall"; - preInstallCheck = '' export JULIA_TEST_USE_MULTIPLE_WORKERS="true" # Some tests require read/write access to $HOME. @@ -102,6 +127,18 @@ stdenv.mkDerivation rec { export HOME=$(mktemp -d) ''; + installCheckPhase = '' + runHook preInstallCheck + # Command lifted from `test/Makefile`. + $out/bin/julia \ + --check-bounds=yes \ + --startup-file=no \ + --depwarn=error \ + $out/share/julia/test/runtests.jl \ + --skip internet_required ${toString skip_tests} + runHook postInstallCheck + ''; + dontStrip = true; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/julia/patches/1.10/0002-skip-failing-and-flaky-tests.patch b/pkgs/development/compilers/julia/patches/1.10/0002-skip-failing-and-flaky-tests.patch deleted file mode 100644 index 474653bf342c..000000000000 --- a/pkgs/development/compilers/julia/patches/1.10/0002-skip-failing-and-flaky-tests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9da2f2596db9f4f1a61825d82d9b8c3f3b2e99aa Mon Sep 17 00:00:00 2001 -From: Nick Cao -Date: Wed, 10 Jan 2024 20:58:20 -0500 -Subject: [PATCH 2/2] skip failing and flaky tests - ---- - test/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/Makefile b/test/Makefile -index 88dbe5b2b4..a2a7a55e20 100644 ---- a/test/Makefile -+++ b/test/Makefile -@@ -28,7 +28,7 @@ default: - - $(TESTS): - @cd $(SRCDIR) && \ -- $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl $@) -+ $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl --skip NetworkOptions REPL channels FileWatching ccall $@) - - $(addprefix revise-, $(TESTS)): revise-% : - @cd $(SRCDIR) && \ --- -2.43.0 - diff --git a/pkgs/development/compilers/julia/patches/1.11/0002-skip-failing-and-flaky-tests.patch b/pkgs/development/compilers/julia/patches/1.11/0002-skip-failing-and-flaky-tests.patch deleted file mode 100644 index 3577e6e71e15..000000000000 --- a/pkgs/development/compilers/julia/patches/1.11/0002-skip-failing-and-flaky-tests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9da2f2596db9f4f1a61825d82d9b8c3f3b2e99aa Mon Sep 17 00:00:00 2001 -From: Nick Cao -Date: Wed, 10 Jan 2024 20:58:20 -0500 -Subject: [PATCH 2/2] skip failing and flaky tests - ---- - test/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/Makefile b/test/Makefile -index 88dbe5b2b4..a2a7a55e20 100644 ---- a/test/Makefile -+++ b/test/Makefile -@@ -28,7 +28,7 @@ default: - - $(TESTS): - @cd $(SRCDIR) && \ -- $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl $@) -+ $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl --skip NetworkOptions REPL channels FileWatching ccall loading cmdlineargs $@) - - $(addprefix revise-, $(TESTS)): revise-% : - @cd $(SRCDIR) && \ --- -2.43.0 - diff --git a/pkgs/development/compilers/julia/patches/1.12/0001-skip-failing-and-flaky-tests.patch b/pkgs/development/compilers/julia/patches/1.12/0001-skip-failing-and-flaky-tests.patch deleted file mode 100644 index 4ab76c9fa642..000000000000 --- a/pkgs/development/compilers/julia/patches/1.12/0001-skip-failing-and-flaky-tests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From e26b82d0c162b6c22b65b2a5d2cd03d98fd9f5d4 Mon Sep 17 00:00:00 2001 -From: Sergey Volkov -Date: Thu, 9 Oct 2025 13:00:31 +0200 -Subject: [PATCH] disable failing and flaky tests - ---- - test/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/Makefile b/test/Makefile -index 69b7ad1451..583e64a287 100644 ---- a/test/Makefile -+++ b/test/Makefile -@@ -30,7 +30,7 @@ default: - - $(TESTS): - @cd $(SRCDIR) && \ -- $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl $@) -+ $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl --skip NetworkOptions REPL channels FileWatching ccall loading cmdlineargs Distributed precompile compileall $@) - - $(addprefix revise-, $(TESTS)): revise-% : - @cd $(SRCDIR) && \ --- -2.51.0 -