@@ -20,6 +20,16 @@ function with_temp_project(f::Function)
20
20
end
21
21
end
22
22
23
+ function test_setup_dependencies (prefix, dependencies, platform)
24
+ if VERSION >= v " 1.11.0-"
25
+ # A warning is issued in Julia v1.11:
26
+ # <https://github.com/JuliaPackaging/BinaryBuilderBase.jl/issues/358>.
27
+ setup_dependencies (prefix, dependencies, platform)
28
+ else
29
+ @test_logs setup_dependencies (prefix, dependencies, platform)
30
+ end
31
+ end
32
+
23
33
@testset " Dependencies" begin
24
34
name = " Foo_jll"
25
35
dep = Dependency (PackageSpec (; name = name); platforms= supported_platforms (; experimental= true , exclude= ! Sys. isapple))
167
177
Dependency (" Zlib_jll" )
168
178
]
169
179
platform = HostPlatform ()
170
- ap = @test_logs setup_dependencies (prefix, getpkg .(dependencies), platform)
180
+ ap = test_setup_dependencies (prefix, getpkg .(dependencies), platform)
171
181
@test " libz." * platform_dlext (platform) in readdir (last (libdirs (Prefix (destdir (dir, platform)))))
172
182
@test sort! (readdir (joinpath (destdir (dir, platform), " include" ))) == [" zconf.h" , " zlib.h" ]
173
183
202
212
Dependency (" LibCURL_jll" )
203
213
]
204
214
platform = HostPlatform ()
205
- ap = @test_logs setup_dependencies (prefix, getpkg .(dependencies), platform)
215
+ ap = test_setup_dependencies (prefix, getpkg .(dependencies), platform)
206
216
@test " libcurl." * platform_dlext (platform) in readdir (last (libdirs (Prefix (destdir (dir, platform)))))
207
217
@test " curl.h" in readdir (joinpath (destdir (dir, platform), " include" , " curl" ))
208
218
@test " libssh2." * platform_dlext (platform) in readdir (last (libdirs (Prefix (destdir (dir, platform)))))
225
235
Dependency (" LibOSXUnwind_jll" )
226
236
]
227
237
platform = Platform (" i686" , " linux" ; libc= " musl" )
228
- @test_logs (:warn , r" Dependency LibOSXUnwind_jll does not have a mapping for artifact LibOSXUnwind for platform i686-linux-musl" ) begin
238
+ # `match_mode=:any` is a workaround for
239
+ # <https://github.com/JuliaPackaging/BinaryBuilderBase.jl/issues/358>.
240
+ @test_logs (:warn , r" Dependency LibOSXUnwind_jll does not have a mapping for artifact LibOSXUnwind for platform i686-linux-musl" ) match_mode= (VERSION >= v " 1.11.0-" ? :any : :all ) begin
229
241
setup_dependencies (prefix, getpkg .(dependencies), platform)
230
242
end
231
243
@test " destdir" ∉ readdir (dirname (destdir (dir, platform)))
238
250
platform = Platform (" x86_64" , " linux" ; julia_version= v " 1.5" )
239
251
240
252
# Test that a particular version of GMP is installed
241
- @test @test_logs ! isempty (setup_dependencies (prefix, getpkg .(dependencies), platform))
253
+ @test ! isempty (test_setup_dependencies (prefix, getpkg .(dependencies), platform))
242
254
@test isfile (joinpath (destdir (dir, platform), " lib" , " libgmp.so.10.3.2" ))
243
255
end
244
256
249
261
platform = Platform (" x86_64" , " linux" ; julia_version= v " 1.6" )
250
262
251
263
# Test that a particular version of GMP is installed
252
- @test_logs setup_dependencies (prefix, getpkg .(dependencies), platform)
264
+ test_setup_dependencies (prefix, getpkg .(dependencies), platform)
253
265
@test isfile (joinpath (destdir (dir, platform), " lib" , " libgmp.so.10.4.0" ))
254
266
end
255
267
269
281
270
282
# If we don't give a `julia_version`, then we are FULLY UNSHACKLED.
271
283
platform = Platform (" x86_64" , " linux" )
272
- @test_logs setup_dependencies (prefix, getpkg .(dependencies), platform)
284
+ test_setup_dependencies (prefix, getpkg .(dependencies), platform)
273
285
@test isfile (joinpath (destdir (dir, platform), " lib" , " libgmp.so.10.3.2" ))
274
286
@test isfile (joinpath (destdir (dir, platform), " lib" , " libmpfr.so.6.1.0" ))
275
287
end
296
308
),
297
309
]
298
310
platform = Platform (" x86_64" , " linux" ; libc= " glibc" )
299
- @test_logs setup_dependencies (prefix, dependencies, platform)
311
+ test_setup_dependencies (prefix, dependencies, platform)
300
312
@test readdir (joinpath (destdir (dir, platform), " bin" )) == [" hello_world" ]
301
313
end
302
314
end
314
326
),
315
327
]
316
328
platform = Platform (" x86_64" , " linux" ; libc= " glibc" )
317
- @test_logs setup_dependencies (prefix, dependencies, platform)
329
+ test_setup_dependencies (prefix, dependencies, platform)
318
330
@test readdir (joinpath (destdir (dir, platform), " bin" )) == [" hello_world" ]
319
331
end
320
332
325
337
get_addable_spec (" Zlib_jll" , v " 1.2.12+4" )
326
338
]
327
339
platform = Platform (" x86_64" , " linux" )
328
- @test_logs setup_dependencies (prefix, dependencies, platform)
340
+ test_setup_dependencies (prefix, dependencies, platform)
329
341
readmeta (joinpath (destdir (dir, platform), " lib" , " libz.so" )) do oh
330
342
symbols = symbol_name .(Symbols (oh))
331
343
# The platform didn't specify the sanitizer, the library shouldn't contain
341
353
get_addable_spec (" Zlib_jll" , v " 1.2.12+4" )
342
354
]
343
355
platform = Platform (" x86_64" , " linux" ; sanitize= " memory" )
344
- @test_logs setup_dependencies (prefix, dependencies, platform)
356
+ test_setup_dependencies (prefix, dependencies, platform)
345
357
readmeta (joinpath (destdir (dir, platform), " lib" , " libz.so" )) do oh
346
358
symbols = symbol_name .(Symbols (oh))
347
359
# Make sure the library contains only "msan" symbols
0 commit comments