Skip to content

Commit

Permalink
xx-verify: since file 5.46 it expects ARM64 on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Dec 9, 2024
1 parent b656128 commit 1b64828
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
51 changes: 51 additions & 0 deletions src/test-go.bats
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ testEnv() {
export TARGETOS=darwin
export TARGETARCH=amd64
testEnv
unset TARGETOS
}

@test "darwin-arm64-env" {
Expand All @@ -235,6 +236,27 @@ testEnv() {
unset TARGETOS
}

@test "windows-386-env" {
export TARGETOS=windows
export TARGETARCH=386
testEnv
unset TARGETOS
}

@test "windows-amd64-env" {
export TARGETOS=windows
export TARGETARCH=amd64
testEnv
unset TARGETOS
}

@test "windows-arm64-env" {
export TARGETOS=windows
export TARGETARCH=arm64
testEnv
unset TARGETOS
}

testHelloGO() {
run xx-go build -o /tmp/a.out ./fixtures/hello.go
assert_success
Expand Down Expand Up @@ -346,6 +368,35 @@ testHelloGO() {
export TARGETARCH=amd64
export TARGETOS=darwin
testHelloGO
unset TARGETOS
}

@test "darwin-arm64-hellogo" {
export TARGETARCH=arm64
export TARGETOS=darwin
testHelloGO
unset TARGETOS
}

@test "windows-386-hellogo" {
export TARGETARCH=386
export TARGETOS=windows
testHelloGO
unset TARGETOS
}

@test "windows-amd64-hellogo" {
export TARGETARCH=amd64
export TARGETOS=windows
testHelloGO
unset TARGETOS
}

@test "windows-arm64-hellogo" {
export TARGETARCH=arm64
export TARGETOS=windows
testHelloGO
unset TARGETOS
}

testHelloCGO() {
Expand Down
5 changes: 5 additions & 0 deletions src/test-verify.bats
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ load 'assert'
run xx-verify /idontexist
assert_failure

export XX_VERIFY_FILE_CMD_OUTPUT=": PE32+ executable (console) ARM64 (stripped to external PDB), for MS Windows"
export TARGETPLATFORM=windows/arm64
run xx-verify /idontexist
assert_success

export XX_VERIFY_FILE_CMD_OUTPUT=": PE32+ executable (console) Aarch64 (stripped to external PDB), for MS Windows"
export TARGETPLATFORM=windows/arm64
run xx-verify /idontexist
Expand Down
3 changes: 2 additions & 1 deletion src/xx-verify
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ for f in "$@"; do
expArch="arm64"
;;
"windows")
expArch="Aarch64"
expArch="ARM64"
expArchAlt="Aarch64"
;;
*)
expArch="ARM aarch64"
Expand Down

0 comments on commit 1b64828

Please sign in to comment.