Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/test-go.bats
Original file line number Diff line number Diff line change
Expand Up @@ -307,23 +307,35 @@ testHelloGO() {
}

@test "mipsle-hellogo" {
if ! supportMipsBuildGo; then
skip "MIPS build not supported"
fi
export TARGETARCH=mipsle
testHelloGO
}

@test "mipsle-softfloat-hellogo" {
if ! supportMipsBuildGo; then
skip "MIPS build not supported"
fi
export TARGETARCH=mipsle
export TARGETVARIANT=softfloat
testHelloGO
unset TARGETVARIANT
}

@test "mips64le-hellogo" {
if ! supportMipsBuildGo; then
skip "MIPS build not supported"
fi
export TARGETARCH=mips64le
testHelloGO
}

@test "mips64le-softfloat-hellogo" {
if ! supportMipsBuildGo; then
skip "MIPS build not supported"
fi
export TARGETARCH=mips64le
export TARGETVARIANT=softfloat
testHelloGO
Expand Down
6 changes: 6 additions & 0 deletions src/test_helper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ supportAmd64VariantGo() {
versionGTE "$(go version | awk '{print $3}' | sed 's/^go//')" "1.18"
}

# Supported since Go 1.13: https://go.dev/wiki/GoMips
# But fails on Ubuntu 22.04 with Go 1.18.1: https://github.com/tonistiigi/xx/issues/177
supportMipsBuildGo() {
! grep -q 'ID=ubuntu' /etc/os-release && ! grep -q 'VERSION_ID="22.04"' /etc/os-release && versionGTE "$(go version | awk '{print $3}' | sed 's/^go//')" "1.13"
}

supportRC() {
command -v llvm-rc >/dev/null 2>&1
}
Loading