Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update loong64 for test-go.bats
Browse files Browse the repository at this point in the history
Signed-off-by: yzewei <yangzewei@loongson.cn>
yzewei committed Jan 10, 2024
1 parent 085ef03 commit f56a6a0
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/test-go.bats
Original file line number Diff line number Diff line change
@@ -9,7 +9,11 @@ ensureGo() {
else
add golang
fi
add clang lld
if [ "$(xx-info arch)" = "loong64" ]; then
add clang binutils
else
add clang lld
fi
}

setup_file() {
@@ -262,6 +266,9 @@ testHelloGO() {
}

@test "loong64-hellogo" {
if ! supportLoongArchGo; then
skip "LOONGARCH GO not supported"
fi
export TARGETARCH=loong64
testHelloGO
}
4 changes: 4 additions & 0 deletions src/test_helper.bash
Original file line number Diff line number Diff line change
@@ -91,6 +91,10 @@ supportRiscVCGo() {
versionGTE "$(go version | awk '{print $3}' | sed 's/^go//')" "1.16"
}

supportLoongArchGo() {
versionGTE "$(go version | awk '{print $3}' | sed 's/^go//')" "1.19"
}

supportLoongArch() {
if [ -f /etc/debian_version ]; then
if grep "sid" /etc/apt/sources.list 2>/dev/null >/dev/null; then

0 comments on commit f56a6a0

Please sign in to comment.