Skip to content

Commit

Permalink
Filter the log file from the BB products
Browse files Browse the repository at this point in the history
This was polluting the `readdir()` results and causing the BB build to wrongly
be marked as failed and fall back to the native build method with
`build_libbitfield_native()`.

Also added a full backtrace to the warning logs when build errors do occur in
either functions.
  • Loading branch information
JamesWrigley authored and Gnimuc committed Dec 24, 2023
1 parent 35692a1 commit fbfe994
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test_bitfield.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function build_libbitfield_native()
run(build_cmd)
run(install_cmd)
catch e
@warn "Building libbitfield with native tools failed: $e"
@warn "Building libbitfield with native tools failed" exception=(e, catch_backtrace())
success = false
end
return success
Expand All @@ -37,13 +37,14 @@ function build_libbitfield_binarybuilder()
cd(@__DIR__) do
run(`$(Base.julia_cmd()) --project bitfield/build_tarballs.jl`)
# from Pkg.download_verify_unpack
tarball_path = only(readdir("products"))
# Note that we filter out the extra log file that's generated
tarball_path = only(filter(!contains("-logs.v"), readdir("products")))
dest = "build"
rm(dest; recursive = true)
Tar.extract(`$(p7zip_jll.p7zip()) x products/$tarball_path -so`, dest)
end
catch e
@warn "Building libbitfield with BinaryBuilder failed: $e"
@warn "Building libbitfield with BinaryBuilder failed" exception=(e, catch_backtrace())
success = false
end
return success
Expand Down

0 comments on commit fbfe994

Please sign in to comment.