Skip to content

Commit

Permalink
update src/test-*.bash
Browse files Browse the repository at this point in the history
Signed-off-by: yzewei <[email protected]>
  • Loading branch information
yzewei committed Dec 7, 2023
1 parent 8b355ea commit 7ecac9f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
10 changes: 1 addition & 9 deletions src/test-clang.bats
Original file line number Diff line number Diff line change
Expand Up @@ -255,16 +255,8 @@ testBuildHello() {
}

@test "loongarch64-c-ld" {
if ! supportLoongArch; then
skip "LOONGARCH not supported"
fi
skip "LOONGARCH not supported"
export TARGETARCH=loongarch64
expectedLinker="/usr/bin/loongarch64-alpine-linux-musl-gcc"
if [ ! -f "/etc/alpine-release" ]; then
expectedLinker="/usr/bin/loongarch64-linux-gnu-ld"
else
expectedSuffix=" -Wl,-rpath-link,/loongarch64-alpine-linux-musl/usr/lib"
fi
testHelloCLLD # actually runs with ld
expectedLinker=
expectedSuffix=
Expand Down
6 changes: 3 additions & 3 deletions src/test-go.bats
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ testEnv() {
}

@test "loongarch64-env" {
export TARGETARCH=loongarch64
export TARGETARCH=loong64
testEnv
}

Expand Down Expand Up @@ -229,7 +229,7 @@ testHelloGO() {
if ! supportLoongArchGo; then
skip "LoongArch64 GO not supported"
fi
export TARGETARCH=loongarch64
export TARGETARCH=loong64
testHelloGO
}

Expand Down Expand Up @@ -320,7 +320,7 @@ testHelloCGO() {
if ! supportLoongArchCGo; then
skip "LoongArch CGO not supported"
fi
export TARGETARCH=loongarch64
export TARGETARCH=loong64
testHelloCGO
}

Expand Down
2 changes: 1 addition & 1 deletion src/test_helper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ supportRiscVCGo() {

supportLoongArch() {
if [ -f /etc/debian_version ]; then
if grep "DaoXiangHu" /etc/apt/sources.list 2>/dev/null >/dev/null; then
if grep "DaoXiangHu" /etc/apt/sources.list 2>/dev/null >/dev/null || grep "sid" /etc/apt/sources.list 2>/dev/null >/dev/null; then
return 0
else
return 1
Expand Down

0 comments on commit 7ecac9f

Please sign in to comment.