Skip to content

Commit 3afee34

Browse files
committed
Filter the log file from the BB products
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.
1 parent bd2fc8a commit 3afee34

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/test_bitfield.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function build_libbitfield_native()
2323
run(build_cmd)
2424
run(install_cmd)
2525
catch e
26-
@warn "Building libbitfield with native tools failed: $e"
26+
@warn "Building libbitfield with native tools failed" exception=(e, catch_backtrace())
2727
success = false
2828
end
2929
return success
@@ -37,13 +37,14 @@ function build_libbitfield_binarybuilder()
3737
cd(@__DIR__) do
3838
run(`$(Base.julia_cmd()) --project bitfield/build_tarballs.jl`)
3939
# from Pkg.download_verify_unpack
40-
tarball_path = only(readdir("products"))
40+
# Note that we filter out the extra log file that's generated
41+
tarball_path = only(filter(!contains("-logs.v"), readdir("products")))
4142
dest = "build"
4243
rm(dest; recursive = true)
4344
Tar.extract(`$(p7zip_jll.p7zip()) x products/$tarball_path -so`, dest)
4445
end
4546
catch e
46-
@warn "Building libbitfield with BinaryBuilder failed: $e"
47+
@warn "Building libbitfield with BinaryBuilder failed" exception=(e, catch_backtrace())
4748
success = false
4849
end
4950
return success

0 commit comments

Comments
 (0)