|
271 | 271 | @test !BinaryProvider.platforms_match(Linux(:x86_64), UnknownPlatform())
|
272 | 272 | @test !BinaryProvider.platforms_match(Linux(:x86_64, compiler_abi=CompilerABI(:gcc7)), Linux(:x86_64, compiler_abi=CompilerABI(:gcc8)))
|
273 | 273 | @test !BinaryProvider.platforms_match(Linux(:x86_64, compiler_abi=CompilerABI(:gcc7, :cxx11)), Linux(:x86_64, compiler_abi=CompilerABI(:gcc7, :cxx03)))
|
| 274 | + |
| 275 | + # Test that :gcc4 matches with :gcc5 and :gcc6, as we only care aobut libgfortran version |
| 276 | + @test BinaryProvider.platforms_match( |
| 277 | + Linux(:x86_64; compiler_abi=CompilerABI(:gcc4)), |
| 278 | + Linux(:x86_64; compiler_abi=CompilerABI(:gcc5)), |
| 279 | + ) |
| 280 | + @test BinaryProvider.platforms_match( |
| 281 | + Linux(:x86_64; compiler_abi=CompilerABI(:gcc4)), |
| 282 | + Linux(:x86_64; compiler_abi=CompilerABI(:gcc6)), |
| 283 | + ) |
| 284 | + @test BinaryProvider.platforms_match( |
| 285 | + Linux(:x86_64; compiler_abi=CompilerABI(:gcc5)), |
| 286 | + Linux(:x86_64; compiler_abi=CompilerABI(:gcc6)), |
| 287 | + ) |
274 | 288 | end
|
275 | 289 |
|
276 | 290 | @testset "DL name/version parsing" begin
|
@@ -789,21 +803,37 @@ end
|
789 | 803 |
|
790 | 804 | @testset "choose_download" begin
|
791 | 805 | platforms = Dict(
|
| 806 | + # Typical binning test |
792 | 807 | Linux(:x86_64, compiler_abi=CompilerABI(:gcc4)) => "linux4",
|
793 | 808 | Linux(:x86_64, compiler_abi=CompilerABI(:gcc7)) => "linux7",
|
794 | 809 | Linux(:x86_64, compiler_abi=CompilerABI(:gcc8)) => "linux8",
|
| 810 | + |
| 811 | + # Ambiguity test |
| 812 | + Linux(:aarch64, compiler_abi=CompilerABI(:gcc4)) => "linux4", |
| 813 | + Linux(:aarch64, compiler_abi=CompilerABI(:gcc5)) => "linux5", |
| 814 | + |
795 | 815 | MacOS(:x86_64, compiler_abi=CompilerABI(:gcc4)) => "mac4",
|
796 | 816 | Windows(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx11)) => "win",
|
797 | 817 | )
|
798 | 818 |
|
799 | 819 | @test choose_download(platforms, Linux(:x86_64)) == "linux8"
|
800 | 820 | @test choose_download(platforms, Linux(:x86_64, compiler_abi=CompilerABI(:gcc7))) == "linux7"
|
801 |
| - |
| 821 | + |
| 822 | + # Ambiguity test |
| 823 | + @test choose_download(platforms, Linux(:aarch64)) == "linux5" |
| 824 | + @test choose_download(platforms, Linux(:aarch64; compiler_abi=CompilerABI(:gcc4))) == "linux5" |
| 825 | + @test choose_download(platforms, Linux(:aarch64; compiler_abi=CompilerABI(:gcc5))) == "linux5" |
| 826 | + @test choose_download(platforms, Linux(:aarch64; compiler_abi=CompilerABI(:gcc6))) == "linux5" |
| 827 | + @test choose_download(platforms, Linux(:aarch64; compiler_abi=CompilerABI(:gcc7))) == nothing |
| 828 | + |
802 | 829 | @test choose_download(platforms, MacOS(:x86_64)) == "mac4"
|
803 | 830 | @test choose_download(platforms, MacOS(:x86_64, compiler_abi=CompilerABI(:gcc7))) == nothing
|
804 | 831 |
|
805 | 832 | @test choose_download(platforms, Windows(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx11))) == "win"
|
806 | 833 | @test choose_download(platforms, Windows(:x86_64, compiler_abi=CompilerABI(:gcc_any, :cxx03))) == nothing
|
| 834 | + |
| 835 | + # Poor little guy |
| 836 | + @test choose_download(platforms, FreeBSD(:x86_64)) == nothing |
807 | 837 | end
|
808 | 838 |
|
809 | 839 | # Use `build_libfoo_tarball.jl` in the BinaryBuilder.jl repository to generate more of these
|
|
0 commit comments