Skip to content

Commit 638b071

Browse files
committed
Add a test for get_addable_spec
This makes sure we can reliably work around an issue in Pkg.
1 parent 74fd093 commit 638b071

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/dependencies.jl

+13-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ end
105105
end
106106

107107
@testset "Setup" begin
108-
@test BinaryBuilderBase.get_addable_spec("LLVM_jll", v"13.0.0+2") ==
108+
@test get_addable_spec("LLVM_jll", v"13.0.0+2") ==
109109
PackageSpec(
110110
name="LLVM_jll",
111111
uuid="86de99a1-58d6-5da7-8064-bd56ce2e322c",
@@ -134,6 +134,18 @@ end
134134
@test readdir(joinpath(destdir(dir, platform), "logs")) == []
135135
end
136136

137+
# Make sure we can use `get_addable_spec` to work around
138+
# https://github.com/JuliaLang/Pkg.jl/issues/2942
139+
with_temp_project() do dir
140+
prefix = Prefix(dir)
141+
dependencies = [
142+
Dependency(get_addable_spec("LibOSXUnwind_jll", v"0.0.6+1")),
143+
]
144+
platform = Platform("x86_64", "macos"; julia_version="1.6.0")
145+
@test setup_dependencies(prefix, getpkg.(dependencies), platform) isa Vector{String} broken=VERSION<v"1.8.0-DEV"
146+
@test all(in(readdir(joinpath(destdir(dir, platform), "lib"))), ("libosxunwind.a", "libosxunwind.dylib")) broken=VERSION<v"1.8.0-DEV"
147+
end
148+
137149
# Setup a dependency of a JLL package which is also a standard library
138150
with_temp_project() do dir
139151
prefix = Prefix(dir)

0 commit comments

Comments
 (0)