Skip to content

Commit 265442a

Browse files
authored
Add test for compression format of tarball (#1396)
* Add test for compression format of tarball * Bump requirement for BinaryBuilderBase
1 parent 3d9973f commit 265442a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ghr_jll = "07c12ed4-43bc-5495-8a2a-d5838ef8d533"
3636
[compat]
3737
ArgParse = "1.1"
3838
Binutils_jll = "2"
39-
BinaryBuilderBase = "1.39"
39+
BinaryBuilderBase = "1.39.1"
4040
Downloads = "1"
4141
GitHub = "5.1"
4242
HTTP = "0.8, 0.9, 1"

test/building.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using BinaryBuilderBase: detect_compressor
2+
13
@testset "Building libfoo" begin
24
# Test building with both `make` and `cmake`, using directory and git repository
35
for script in (libfoo_make_script, libfoo_cmake_script, libfoo_meson_script)
@@ -211,6 +213,12 @@ shards_to_test = expand_cxxstring_abis(expand_gfortran_versions(shards_to_test))
211213
# Ensure the build products were created
212214
@test isfile(tarball_path)
213215

216+
compressor = open(tarball_path) do io
217+
detect_compressor(read(io, 6))
218+
end
219+
# Make sure the compression format is what we expect
220+
@test compressor == "xz"
221+
214222
# Unpack it somewhere else
215223
@test verify(tarball_path, tarball_hash)
216224
testdir = joinpath(build_path, "testdir")

0 commit comments

Comments
 (0)