Skip to content

Commit

Permalink
fix tests passing when dep warnings are errors (as they are on Julia CI)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Nov 27, 2022
1 parent c52bf27 commit f1a47ed
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/gluedeps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit f1a47ed

Please sign in to comment.