@@ -7,43 +7,59 @@ using BinaryBuilder: jll_uuid, build_project_dict, get_github_author_login, Wiza
77module TestJLL end
88
99@testset " JLLs - utils" begin
10- @test jll_uuid (" Zlib_jll" ) == UUID (" 83775a58-1f1d-513f-b197-d71354ab007a" )
11- @test jll_uuid (" FFMPEG_jll" ) == UUID (" b22a6f82-2f65-5046-a5b2-351ab43fb4e5" )
12-
13- project = build_project_dict (" LibFoo" , v " 1.3.5" ,
14- [Dependency (" Zlib_jll" ),
15- Dependency (PackageSpec (name = " XZ_jll" ), compat = " =2.4.6" ),
16- Dependency (PackageSpec (name = " Preferences" , uuid = parse (UUID, " 21216c6a-2e73-6563-6e65-726566657250" ))),
17- Dependency (" Scratch" ),])
18- @test project[" deps" ] == Dict (" JLLWrappers" => " 692b3bcd-3c85-4b1f-b108-f13ce0eb3210" ,
19- " Artifacts" => " 56f22d72-fd6d-98f1-02f0-08ddc0907c33" ,
20- " Pkg" => " 44cfe95a-1eb2-52ea-b672-e2afdf69b78f" ,
21- " Zlib_jll" => " 83775a58-1f1d-513f-b197-d71354ab007a" ,
22- " Libdl" => " 8f399da3-3557-5675-b5ff-fb832c97cbdb" ,
23- " XZ_jll" => " ffd25f8a-64ca-5728-b0f7-c24cf3aae800" ,
24- " Preferences" => " 21216c6a-2e73-6563-6e65-726566657250" ,
25- " Scratch" => " 6c6a2e73-6563-6170-7368-637461726353" )
26- @test project[" name" ] == " LibFoo_jll"
27- @test project[" uuid" ] == " b250f842-3251-58d3-8ee4-9a24ab2bab3f"
28- @test project[" compat" ] == Dict (
29- " julia" => " 1.0" ,
30- " XZ_jll" => " =2.4.6" ,
31- " JLLWrappers" => " 1.7.0" ,
32- " Libdl" => " < 0.0.1, 1" ,
33- " Artifacts" => " < 0.0.1, 1" ,
34- " Pkg" => " < 0.0.1, 1" ,
35- )
36- @test project[" version" ] == " 1.3.5"
37- # Make sure BuildDependency's don't find their way to the project
38- @test_throws AssertionError build_project_dict (" LibFoo" , v " 1.3.5" , [Dependency (" Zlib_jll" ), BuildDependency (" Xorg_util_macros_jll" )])
39- # `Pkg` should not be a dependency if we require Julia v1.6.
40- @test ! haskey (BinaryBuilder. build_project_dict (" foo" , v " 1.2" , Dependency[], " 1.6" )[" deps" ], " Pkg" )
41-
42- gh_auth = Wizard. github_auth (;allow_anonymous= true )
43- @test get_github_author_login (" JuliaPackaging/Yggdrasil" , " invalid_hash" ; gh_auth) === nothing
44- @test get_github_author_login (" JuliaPackaging/Yggdrasil" , " 815de56a4440f4e05333c5295d74f1dc9b73ebe3" ; gh_auth) === nothing
45- if gh_auth != GitHub. AnonymousAuth ()
46- @test get_github_author_login (" JuliaPackaging/Yggdrasil" , " dea7c3fadad16281ead2427f7ab9b32f1c8cb664" ; gh_auth) === " Pangoraw"
10+ @testset " jll_uuid" begin
11+ @test jll_uuid (" Zlib_jll" ) == UUID (" 83775a58-1f1d-513f-b197-d71354ab007a" )
12+ @test jll_uuid (" FFMPEG_jll" ) == UUID (" b22a6f82-2f65-5046-a5b2-351ab43fb4e5" )
13+ end
14+
15+ @testset " build_project_dict" begin
16+ project = build_project_dict (" LibFoo" , v " 1.3.5" ,
17+ [Dependency (" Zlib_jll" ),
18+ Dependency (PackageSpec (name = " XZ_jll" ), compat = " =2.4.6" ),
19+ Dependency (PackageSpec (name = " Preferences" , uuid = parse (UUID, " 21216c6a-2e73-6563-6e65-726566657250" ))),
20+ Dependency (" Scratch" ),])
21+ @test project[" deps" ] == Dict (" JLLWrappers" => " 692b3bcd-3c85-4b1f-b108-f13ce0eb3210" ,
22+ " Artifacts" => " 56f22d72-fd6d-98f1-02f0-08ddc0907c33" ,
23+ " Pkg" => " 44cfe95a-1eb2-52ea-b672-e2afdf69b78f" ,
24+ " Zlib_jll" => " 83775a58-1f1d-513f-b197-d71354ab007a" ,
25+ " Libdl" => " 8f399da3-3557-5675-b5ff-fb832c97cbdb" ,
26+ " XZ_jll" => " ffd25f8a-64ca-5728-b0f7-c24cf3aae800" ,
27+ " Preferences" => " 21216c6a-2e73-6563-6e65-726566657250" ,
28+ " Scratch" => " 6c6a2e73-6563-6170-7368-637461726353" )
29+ @test project[" name" ] == " LibFoo_jll"
30+ @test project[" uuid" ] == " b250f842-3251-58d3-8ee4-9a24ab2bab3f"
31+ @test project[" compat" ] == Dict (
32+ " julia" => " 1.0" ,
33+ " XZ_jll" => " =2.4.6" ,
34+ " JLLWrappers" => " 1.7.0" ,
35+ " Libdl" => " < 0.0.1, 1" ,
36+ " Artifacts" => " < 0.0.1, 1" ,
37+ " Pkg" => " < 0.0.1, 1" ,
38+ )
39+ @test project[" version" ] == " 1.3.5"
40+ # Make sure BuildDependency's don't find their way to the project
41+ @test_throws AssertionError build_project_dict (" LibFoo" , v " 1.3.5" , [Dependency (" Zlib_jll" ), BuildDependency (" Xorg_util_macros_jll" )])
42+ # `Pkg` should not be a dependency if we require Julia v1.6.
43+ @test ! haskey (BinaryBuilder. build_project_dict (" foo" , v " 1.2" , Dependency[], " 1.6" )[" deps" ], " Pkg" )
44+ end
45+
46+ @testset " filter_main_tarball" begin
47+ @test ! BinaryBuilder. filter_main_tarball (" " , AnyPlatform ())
48+ @test BinaryBuilder. filter_main_tarball (" Foo.v1.2.3.x86_64-linux-gnu.tar.gz" , Platform (" x86_64" , " linux" ))
49+ @test ! BinaryBuilder. filter_main_tarball (" Foo-logs.v1.2.3.x86_64-linux-gnu.tar.gz" , Platform (" x86_64" , " linux" ))
50+ @test ! BinaryBuilder. filter_main_tarball (" Foo.v1.2.3.x86_64-linux-gnu-cxx11.tar.gz" , Platform (" x86_64" , " linux" ))
51+ @test ! BinaryBuilder. filter_main_tarball (" Foo.v1.2.3.x86_64-linux-gnu.tar.gz" , Platform (" x86_64" , " linux" ; cxxstring_abi= " cxx11" ))
52+ @test BinaryBuilder. filter_main_tarball (" Foo_Bar.v1.2.3.aarch64-linux-gnu-cuda+12.0-cuda_platform+jetson.tar.gz" , Platform (" aarch64" , " linux" ; cuda= " 12.0" , cuda_platform= " jetson" ))
53+ @test BinaryBuilder. filter_main_tarball (" Foo_Bar.v1.2.3.aarch64-linux-gnu-cuda_platform+jetson-cuda+12.0.tar.gz" , Platform (" aarch64" , " linux" ; cuda= " 12.0" , cuda_platform= " jetson" ))
54+ end
55+
56+ @testset " get_github_author_login" begin
57+ gh_auth = Wizard. github_auth (;allow_anonymous= true )
58+ @test get_github_author_login (" JuliaPackaging/Yggdrasil" , " invalid_hash" ; gh_auth) === nothing
59+ @test get_github_author_login (" JuliaPackaging/Yggdrasil" , " 815de56a4440f4e05333c5295d74f1dc9b73ebe3" ; gh_auth) === nothing
60+ if gh_auth != GitHub. AnonymousAuth ()
61+ @test get_github_author_login (" JuliaPackaging/Yggdrasil" , " dea7c3fadad16281ead2427f7ab9b32f1c8cb664" ; gh_auth) === " Pangoraw"
62+ end
4763 end
4864end
4965
0 commit comments