Skip to content

Commit

Permalink
update loong64 for test-go.bats
Browse files Browse the repository at this point in the history
Signed-off-by: yzewei <[email protected]>
  • Loading branch information
yzewei committed Jan 10, 2024
1 parent 085ef03 commit 2097df3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/test-go.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -119,9 +123,6 @@ testEnv() {
}

@test "loong64-env" {
if ! supportLoongArch; then
skip "LoongArch GO not supported"
fi
export TARGETARCH=loong64
testEnv
}
Expand Down Expand Up @@ -262,6 +263,9 @@ testHelloGO() {
}

@test "loong64-hellogo" {
if ! supportLoongArchGo; then
skip "LOONGARCH GO not supported"
fi
export TARGETARCH=loong64
testHelloGO
}
Expand Down
4 changes: 4 additions & 0 deletions src/test_helper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2097df3

Please sign in to comment.