|
1 |
| -using BinaryBuilderBase: Prefix, archive_artifact, package, list_tarball_files |
| 1 | +using BinaryBuilderBase: Prefix, archive_artifact, package, list_tarball_files, detect_compressor |
2 | 2 | using Pkg.Artifacts: create_artifact, remove_artifact, with_artifacts_directory
|
3 | 3 | using SHA
|
4 | 4 | using Test
|
@@ -27,14 +27,17 @@ using Test
|
27 | 27 |
|
28 | 28 | mktempdir() do output_dir
|
29 | 29 | for (format, ext, hash) in (("gzip", "gz", "568f743e965b63d3187b6a2647700a71d1d7520b4596fbf2bfb39ffa67c4bb55"),
|
30 |
| - # Compressing with p7zip/xz doesn't seem to be fully reproducible, at least not |
31 |
| - # across different systems. We'll try to investigate more, but for the time being |
32 |
| - # skip the reproducibility test for it. |
33 |
| - ("xz", "xz", "")) |
| 30 | + ("xz", "xz", "293736704ee772836edf67ba4bac55c9604721d6df332cef9bdf4c9c06b39a8c")) |
34 | 31 | tarball_path = joinpath(output_dir, "foo.tar.$ext")
|
35 | 32 | package(prefix, tarball_path; format=format)
|
36 | 33 | @test isfile(tarball_path)
|
37 | 34 |
|
| 35 | + compressor = open(tarball_path) do io |
| 36 | + detect_compressor(read(io, 6)) |
| 37 | + end |
| 38 | + # Make sure the compression format is what we expect |
| 39 | + @test compressor == format |
| 40 | + |
38 | 41 | if !isempty(hash)
|
39 | 42 | tarball_hash = open(tarball_path, "r") do io
|
40 | 43 | bytes2hex(sha256(io))
|
|
0 commit comments