Skip to content

Commit 71e537a

Browse files
committed
Toolchains: serialize build products when failure encountered
1 parent c0484fe commit 71e537a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.buildkite/run_bb_tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ steps:
2020
arch: "${ARCH?}"
2121
soft_fail: "${SOFT_FAIL}"
2222
timeout_in_minutes: 120
23+
artifact_paths:
24+
- "BinaryBuilderToolchains.jl/test/*-files.tar.gz"

BinaryBuilderToolchains.jl/test/CToolchainTests.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ ENV["TESTSUITE_OUTPUT_DIR"] = mktempdir(;cleanup=false)
159159
p, output = capture_output(setenv(Cmd(["/bin/bash", "-c", "make clean-all && make compile-all"]), env))
160160
if !success(p)
161161
println(output)
162+
163+
# Tar up build products for later inspection
164+
tarball_path = joinpath(@__DIR__, "$(triplet(target))-$(vendor)-files.tar.gz")
165+
run(`tar -C $(ENV["TESTSUITE_OUTPUT_DIR"]) -czf $(tarball_path) .`)
166+
@info("Build products saved", tarball_path)
162167
end
163168
@test success(p)
164169
end

0 commit comments

Comments
 (0)