From f1a47ed18bd3a306e318143befe9466a5f5fd571 Mon Sep 17 00:00:00 2001 From: Kristoffer Date: Sun, 27 Nov 2022 13:08:22 +0100 Subject: [PATCH] fix tests passing when dep warnings are errors (as they are on Julia CI) --- test/gluedeps.jl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/gluedeps.jl b/test/gluedeps.jl index 8775551524..cd75132106 100644 --- a/test/gluedeps.jl +++ b/test/gluedeps.jl @@ -5,13 +5,17 @@ using Test isolate(loaded_depot=true) do Pkg.activate(; temp=true) Pkg.develop(path=joinpath(@__DIR__, "test_packages", "GluePkgExamples", "HasGluePkgs.jl")) - Pkg.test("HasGluePkgs") + Pkg.test("HasGluePkgs", julia_args=`--depwarn=no`) # OffsetArrays errors from depwarn end isolate(loaded_depot=true) do Pkg.activate(; temp=true) Pkg.develop(path=joinpath(@__DIR__, "test_packages", "GluePkgExamples", "HasDepWithGluePkgs.jl")) - Pkg.test("HasDepWithGluePkgs") - Pkg.status(; glue=true, io=IOBuffer()) # TODO: Test output + Pkg.test("HasDepWithGluePkgs", julia_args=`--depwarn=no`) # OffsetArrays errors from depwarn + io = IOBuffer() + Pkg.status(; glue=true, mode=Pkg.PKGMODE_MANIFEST, io) + # TODO: Test output when glue deps are loaded etc. + str = String(take!(io)) + @test contains(str, "└─ GlueOffsetArrays [OffsetArrays]" ) end isolate(loaded_depot=true) do @@ -26,9 +30,9 @@ using Test Pkg.Registry.add(Pkg.RegistrySpec(path=joinpath(@__DIR__, "test_packages", "GluePkgExamples", "GlueRegistry"))) Pkg.Registry.add("General") Pkg.add("HasGluePkgs") - Pkg.test("HasGluePkgs") + Pkg.test("HasGluePkgs", julia_args=`--depwarn=no`) # OffsetArrays errors from depwarn Pkg.add("HasDepWithGluePkgs") - Pkg.test("HasDepWithGluePkgs") + Pkg.test("HasDepWithGluePkgs", julia_args=`--depwarn=no`) # OffsetArrays errors from depwarn @test_throws Pkg.Resolve.ResolverError Pkg.add(; name = "OffsetArrays", version = "0.9.0") end end