Skip to content

Commit

Permalink
[Runners] Add test about starting a bootstrap runner
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Dec 2, 2021
1 parent 052bb8b commit 1663bc3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/runners.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ end

@testset "hello world" begin
mktempdir() do dir
# Make sure we can start a shell in a runner when the bootstrap list is non-empty
@eval BinaryBuilderBase bootstrap_list = [:rootfs, :platform_support]
ur = preferred_runner()(dir; platform=Platform("x86_64", "linux"; libc="musl"))
iobuff = IOBuffer()
@test run(ur, `/bin/bash -c "echo test"`, iobuff)
seek(iobuff, 0)
# Test that we get the output we expect (e.g. the second line is `test`)
@test readlines(iobuff)[2] == "test"
# Restore empty bootstrap list
@eval BinaryBuilderBase bootstrap_list = Symbol[]
end
end

Expand Down

0 comments on commit 1663bc3

Please sign in to comment.