@@ -6,6 +6,9 @@ using JSON
6
6
@testset " Sources" begin
7
7
@test ArchiveSource (" https://ftp.gnu.org/gnu/wget/wget-1.20.3.tar.gz" , " 31cccfc6630528db1c8e3a06f6decf2a370060b982841cfab2b8677400a5092e" ). unpack_target == " "
8
8
@test ArchiveSource (" https://ftp.gnu.org/gnu/wget/wget-1.20.3.tar.gz" , " 31cccfc6630528db1c8e3a06f6decf2a370060b982841cfab2b8677400a5092e" ; unpack_target = " wget" ). unpack_target == " wget"
9
+ @test ArchiveSource (" https://anaconda.org/conda-forge/versionparsing.jl/1.3.0/download/noarch/versionparsing.jl-1.3.0-ha770c72_0.conda" ,
10
+ " 89156426aacf3e3230644b2d00aa029984da77d36b54b1b9dc022f1e94aa9bf0" ;
11
+ unpack_target= " x86_64-linux-gnu" ). unpack_target == " x86_64-linux-gnu"
9
12
@test GitSource (" https://github.com/jedisct1/libsodium.git" , " 5b2ea7d73d3ffef2fb93b82b9f112f009d54c6e6" ). unpack_target == " "
10
13
@test GitSource (" https://github.com/jedisct1/libsodium.git" , " 5b2ea7d73d3ffef2fb93b82b9f112f009d54c6e6" ; unpack_target = " libs" ). unpack_target == " libs"
11
14
@test FileSource (" https://curl.haxx.se/ca/cacert-2020-01-01.pem" , " adf770dfd574a0d6026bfaa270cb6879b063957177a991d453ff1d302c02081f" ). filename == " cacert-2020-01-01.pem"
@@ -30,6 +33,14 @@ using JSON
30
33
sas = @test_logs (:info , r" Downloading .* to.*" ) download_source (as; verbose = true , downloads_dir = dir)
31
34
# Check that the cache is found
32
35
@test @test_logs (:info , r" Cached file found in .*" ) download_source (as; verbose = true , downloads_dir = dir) == sas
36
+ # Conda archive source
37
+ cas = ArchiveSource (" https://anaconda.org/conda-forge/hdf5/1.14.0/download/linux-64/hdf5-1.14.0-nompi_h5231ba7_102.conda" ,
38
+ " d64e2e691205920a0d0f15876d4bcade18f98ef126959d21316a297516476c7c" ;
39
+ unpack_target= " x86_64-linux-gnu" )
40
+ # Download the source
41
+ scas = @test_logs (:info , r" Downloading .* to.*" ) download_source (cas; verbose = true , downloads_dir = dir)
42
+ # Check that the cache is found
43
+ @test @test_logs (:info , r" Cached file found in .*" ) download_source (cas; verbose = true , downloads_dir = dir) == scas
33
44
fs = FileSource (" https://github.com/JuliaBinaryWrappers/libcellml_jll.jl/releases/download/libcellml-v0.4.0%2B0/libcellml-logs.v0.4.0.x86_64-w64-mingw32-cxx03.tar.gz" , " 237013b20851355c4c1d22ceac7e73207b44d989d38b6874187d333adfc79c77" ; filename = " file-source.tar.gz" )
34
45
# Re-fetch the same tarball, as a `FileSource` this time
35
46
sfs = @test_logs (:info , r" Cached file found in .*" ) download_source (fs; verbose = true , downloads_dir = dir)
@@ -73,6 +84,9 @@ using JSON
73
84
target = joinpath (srcdir, as. unpack_target)
74
85
@test_logs (:info , r" ^Extracting tarball" ) setup (sas, target, true ; tar_flags = " xof" )
75
86
@test isdir (target)
87
+ target = joinpath (srcdir, cas. unpack_target)
88
+ @test_logs (:info , r" ^Extracting conda package" ) (:info , r" ^Extracting tarball" ) setup (scas, target, true ; tar_flags = " xof" )
89
+ @test isdir (target)
76
90
target = joinpath (srcdir, fs. filename)
77
91
@test_logs (:info , r" ^Copying" ) setup (sfs, target, true )
78
92
@test isfile (target)
@@ -95,7 +109,7 @@ using JSON
95
109
@test islink (joinpath (target, " link.patch" ))
96
110
97
111
# Make sure in srcdir there are all files and directories we expect
98
- @test Set (readdir (srcdir)) == Set ([" ARCHDefs" , " logs" , fs. filename, " patches_follow" , " patches_nofollow" ])
112
+ @test Set (readdir (srcdir)) == Set ([" ARCHDefs" , " logs" , " x86_64-linux-gnu " , fs. filename, " patches_follow" , " patches_nofollow" ])
99
113
100
114
# Setup the sources with `setup_workspace`
101
115
workspace = joinpath (dir, " workspace" )
0 commit comments