Skip to content

Commit 126cdb9

Browse files
committed
xx-verify: since file 5.46 it expects ARM64 on Windows
Signed-off-by: CrazyMax <[email protected]>
1 parent b656128 commit 126cdb9

File tree

4 files changed

+61
-1
lines changed

4 files changed

+61
-1
lines changed

src/test-go.bats

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ testEnv() {
226226
export TARGETOS=darwin
227227
export TARGETARCH=amd64
228228
testEnv
229+
unset TARGETOS
229230
}
230231

231232
@test "darwin-arm64-env" {
@@ -235,6 +236,30 @@ testEnv() {
235236
unset TARGETOS
236237
}
237238

239+
@test "windows-386-env" {
240+
export TARGETOS=windows
241+
export TARGETARCH=386
242+
testEnv
243+
unset TARGETOS
244+
}
245+
246+
@test "windows-amd64-env" {
247+
export TARGETOS=windows
248+
export TARGETARCH=amd64
249+
testEnv
250+
unset TARGETOS
251+
}
252+
253+
@test "windows-arm64-env" {
254+
if ! supportWindowsArm64Go; then
255+
skip "Windows ARM64 not supported"
256+
fi
257+
export TARGETOS=windows
258+
export TARGETARCH=arm64
259+
testEnv
260+
unset TARGETOS
261+
}
262+
238263
testHelloGO() {
239264
run xx-go build -o /tmp/a.out ./fixtures/hello.go
240265
assert_success
@@ -346,6 +371,31 @@ testHelloGO() {
346371
export TARGETARCH=amd64
347372
export TARGETOS=darwin
348373
testHelloGO
374+
unset TARGETOS
375+
}
376+
377+
@test "windows-386-hellogo" {
378+
export TARGETARCH=386
379+
export TARGETOS=windows
380+
testHelloGO
381+
unset TARGETOS
382+
}
383+
384+
@test "windows-amd64-hellogo" {
385+
export TARGETARCH=amd64
386+
export TARGETOS=windows
387+
testHelloGO
388+
unset TARGETOS
389+
}
390+
391+
@test "windows-arm64-hellogo" {
392+
if ! supportWindowsArm64Go; then
393+
skip "Windows ARM64 not supported"
394+
fi
395+
export TARGETARCH=arm64
396+
export TARGETOS=windows
397+
testHelloGO
398+
unset TARGETOS
349399
}
350400

351401
testHelloCGO() {

src/test-verify.bats

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ load 'assert'
121121
run xx-verify /idontexist
122122
assert_failure
123123

124+
export XX_VERIFY_FILE_CMD_OUTPUT=": PE32+ executable (console) ARM64 (stripped to external PDB), for MS Windows"
125+
export TARGETPLATFORM=windows/arm64
126+
run xx-verify /idontexist
127+
assert_success
128+
124129
export XX_VERIFY_FILE_CMD_OUTPUT=": PE32+ executable (console) Aarch64 (stripped to external PDB), for MS Windows"
125130
export TARGETPLATFORM=windows/arm64
126131
run xx-verify /idontexist

src/test_helper.bash

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ supportMipsBuildGo() {
101101
! 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"
102102
}
103103

104+
supportWindowsArm64Go() {
105+
versionGTE "$(go version | awk '{print $3}' | sed 's/^go//')" "1.17"
106+
}
107+
104108
supportRC() {
105109
command -v llvm-rc >/dev/null 2>&1
106110
}

src/xx-verify

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ for f in "$@"; do
153153
expArch="arm64"
154154
;;
155155
"windows")
156-
expArch="Aarch64"
156+
expArch="ARM64"
157+
expArchAlt="Aarch64"
157158
;;
158159
*)
159160
expArch="ARM aarch64"

0 commit comments

Comments
 (0)