From eaca4a882e6ee983b961ee3ea26a003f930c1541 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Wed, 28 Aug 2024 21:52:34 +0100 Subject: [PATCH] make some test_logs match any because of new Downloads debugs (#4007) (cherry picked from commit 43e7849ce37545493d0da3226cd7449f5f88563e) --- test/new.jl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/test/new.jl b/test/new.jl index a1b8f28683..260c5ff3a5 100644 --- a/test/new.jl +++ b/test/new.jl @@ -716,6 +716,7 @@ end (:debug, "tiered_resolve: trying PRESERVE_ALL_INSTALLED"), (:debug, "tiered_resolve: trying PRESERVE_ALL"), min_level=Logging.Debug, + match_mode=:any, Pkg.add(Pkg.PackageSpec(;name="JSON", version="0.18.0"); preserve=Pkg.PRESERVE_TIERED_INSTALLED) ) @test Pkg.dependencies()[exuuid].version == v"0.3.0" @@ -726,18 +727,29 @@ end @test_logs( (:debug, "tiered_resolve: trying PRESERVE_ALL_INSTALLED"), min_level=Logging.Debug, + match_mode=:any, Pkg.add("Example"; preserve=Pkg.PRESERVE_TIERED_INSTALLED) # should only add v0.3.0 as it was installed earlier ) @test Pkg.dependencies()[exuuid].version == v"0.3.0" withenv("JULIA_PKG_PRESERVE_TIERED_INSTALLED" => true) do Pkg.activate(temp=true) - @test_logs (:debug, "tiered_resolve: trying PRESERVE_ALL_INSTALLED") min_level=Logging.Debug Pkg.add(name="Example") + @test_logs( + (:debug, "tiered_resolve: trying PRESERVE_ALL_INSTALLED"), + min_level=Logging.Debug, + match_mode=:any, + Pkg.add(name="Example") + ) @test Pkg.dependencies()[exuuid].version == v"0.3.0" end Pkg.activate(temp=true) - @test_logs (:debug, "tiered_resolve: trying PRESERVE_ALL") min_level=Logging.Debug Pkg.add(name="Example") # default 'add' should serve a newer version + @test_logs( + (:debug, "tiered_resolve: trying PRESERVE_ALL"), + min_level=Logging.Debug, + match_mode=:any, + Pkg.add(name="Example") # default 'add' should serve a newer version + ) @test Pkg.dependencies()[exuuid].version > v"0.3.0" end # - `tiered` is the default option.