Skip to content

Commit 826037f

Browse files
committed
Fix build_test on amd64 NetBSD
1 parent 7ffb24d commit 826037f

4 files changed

Lines changed: 104 additions & 50 deletions

File tree

Makefile

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -13,72 +13,72 @@ check: ## Check
1313
BUILD_FAIL_PATTERN=grep -v "exec format error" | grep "build failed" && exit 1 || exit 0
1414
build_test: ## test only buildable
1515
# Supported operating systems
16-
GOOS=linux GOARCH=amd64 go test ./... | $(BUILD_FAIL_PATTERN)
17-
GOOS=linux GOARCH=386 go test ./... | $(BUILD_FAIL_PATTERN)
18-
GOOS=linux GOARCH=arm go test ./... | $(BUILD_FAIL_PATTERN)
19-
GOOS=linux GOARCH=arm64 go test ./... | $(BUILD_FAIL_PATTERN)
20-
GOOS=linux GOARCH=loong64 go test ./... | $(BUILD_FAIL_PATTERN)
21-
GOOS=linux GOARCH=riscv64 go test ./... | $(BUILD_FAIL_PATTERN)
22-
GOOS=linux GOARCH=s390x go test ./... | $(BUILD_FAIL_PATTERN)
23-
GOOS=freebsd GOARCH=amd64 go test ./... | $(BUILD_FAIL_PATTERN)
24-
GOOS=freebsd GOARCH=386 go test ./... | $(BUILD_FAIL_PATTERN)
25-
GOOS=freebsd GOARCH=arm go test ./... | $(BUILD_FAIL_PATTERN)
26-
GOOS=freebsd GOARCH=arm64 go test ./... | $(BUILD_FAIL_PATTERN)
27-
CGO_ENABLED=0 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)
28-
GOOS=windows go test ./... | $(BUILD_FAIL_PATTERN)
16+
GOOS=linux GOARCH=amd64 go120 test ./... | $(BUILD_FAIL_PATTERN)
17+
GOOS=linux GOARCH=386 go120 test ./... | $(BUILD_FAIL_PATTERN)
18+
GOOS=linux GOARCH=arm go120 test ./... | $(BUILD_FAIL_PATTERN)
19+
GOOS=linux GOARCH=arm64 go120 test ./... | $(BUILD_FAIL_PATTERN)
20+
GOOS=linux GOARCH=loong64 go120 test ./... | $(BUILD_FAIL_PATTERN)
21+
GOOS=linux GOARCH=riscv64 go120 test ./... | $(BUILD_FAIL_PATTERN)
22+
GOOS=linux GOARCH=s390x go120 test ./... | $(BUILD_FAIL_PATTERN)
23+
GOOS=freebsd GOARCH=amd64 go120 test ./... | $(BUILD_FAIL_PATTERN)
24+
GOOS=freebsd GOARCH=386 go120 test ./... | $(BUILD_FAIL_PATTERN)
25+
GOOS=freebsd GOARCH=arm go120 test ./... | $(BUILD_FAIL_PATTERN)
26+
GOOS=freebsd GOARCH=arm64 go120 test ./... | $(BUILD_FAIL_PATTERN)
27+
CGO_ENABLED=0 GOOS=darwin go120 test ./... | $(BUILD_FAIL_PATTERN)
28+
GOOS=windows go120 test ./... | $(BUILD_FAIL_PATTERN)
2929
# Operating systems supported for building only (not implemented error if used)
30-
GOOS=solaris go test ./... | $(BUILD_FAIL_PATTERN)
31-
GOOS=dragonfly go test ./... | $(BUILD_FAIL_PATTERN)
32-
GOOS=netbsd go test ./... | $(BUILD_FAIL_PATTERN)
30+
GOOS=solaris go120 test ./... | $(BUILD_FAIL_PATTERN)
31+
GOOS=dragonfly go120 test ./... | $(BUILD_FAIL_PATTERN)
32+
GOOS=netbsd go120 test ./... | $(BUILD_FAIL_PATTERN)
3333
# cross build to OpenBSD not worked since process has "C"
34-
# GOOS=openbsd go test ./... | $(BUILD_FAIL_PATTERN)
35-
GOOS=plan9 go test ./... | $(BUILD_FAIL_PATTERN)
34+
# GOOS=openbsd go120 test ./... | $(BUILD_FAIL_PATTERN)
35+
GOOS=plan9 go120 test ./... | $(BUILD_FAIL_PATTERN)
3636

3737
ifeq ($(shell uname -s), Darwin)
38-
CGO_ENABLED=1 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)
38+
CGO_ENABLED=1 GOOS=darwin go120 test ./... | $(BUILD_FAIL_PATTERN)
3939
endif
4040
@echo 'Successfully built on all known operating systems'
4141

4242
vet:
43-
GOOS=darwin GOARCH=amd64 go vet ./...
44-
GOOS=darwin GOARCH=arm64 go vet ./...
43+
GOOS=darwin GOARCH=amd64 go120 vet ./...
44+
GOOS=darwin GOARCH=arm64 go120 vet ./...
4545

46-
GOOS=dragonfly GOARCH=amd64 go vet ./...
46+
GOOS=dragonfly GOARCH=amd64 go120 vet ./...
4747

48-
GOOS=freebsd GOARCH=amd64 go vet ./...
49-
GOOS=freebsd GOARCH=386 go vet ./...
50-
GOOS=freebsd GOARCH=arm go vet ./...
48+
GOOS=freebsd GOARCH=amd64 go120 vet ./...
49+
GOOS=freebsd GOARCH=386 go120 vet ./...
50+
GOOS=freebsd GOARCH=arm go120 vet ./...
5151

52-
GOOS=linux GOARCH=386 go vet ./...
53-
GOOS=linux GOARCH=amd64 go vet ./...
54-
GOOS=linux GOARCH=arm64 go vet ./...
55-
GOOS=linux GOARCH=arm go vet ./...
56-
GOOS=linux GOARCH=loong64 go vet ./...
57-
GOOS=linux GOARCH=mips64 go vet ./...
58-
GOOS=linux GOARCH=mips64le go vet ./...
59-
GOOS=linux GOARCH=mips go vet ./...
60-
GOOS=linux GOARCH=mipsle go vet ./...
61-
GOOS=linux GOARCH=ppc64le go vet ./...
62-
GOOS=linux GOARCH=ppc64 go vet ./...
63-
GOOS=linux GOARCH=riscv64 go vet ./...
64-
GOOS=linux GOARCH=s390x go vet ./...
52+
GOOS=linux GOARCH=386 go120 vet ./...
53+
GOOS=linux GOARCH=amd64 go120 vet ./...
54+
GOOS=linux GOARCH=arm64 go120 vet ./...
55+
GOOS=linux GOARCH=arm go120 vet ./...
56+
GOOS=linux GOARCH=loong64 go120 vet ./...
57+
GOOS=linux GOARCH=mips64 go120 vet ./...
58+
GOOS=linux GOARCH=mips64le go120 vet ./...
59+
GOOS=linux GOARCH=mips go120 vet ./...
60+
GOOS=linux GOARCH=mipsle go120 vet ./...
61+
GOOS=linux GOARCH=ppc64le go120 vet ./...
62+
GOOS=linux GOARCH=ppc64 go120 vet ./...
63+
GOOS=linux GOARCH=riscv64 go120 vet ./...
64+
GOOS=linux GOARCH=s390x go120 vet ./...
6565

66-
GOOS=netbsd GOARCH=amd64 go vet ./...
66+
GOOS=netbsd GOARCH=amd64 go120 vet ./...
6767

68-
GOOS=openbsd GOARCH=386 go vet ./...
69-
GOOS=openbsd GOARCH=amd64 go vet ./...
68+
GOOS=openbsd GOARCH=386 go120 vet ./...
69+
GOOS=openbsd GOARCH=amd64 go120 vet ./...
7070

71-
GOOS=solaris GOARCH=amd64 go vet ./...
71+
GOOS=solaris GOARCH=amd64 go120 vet ./...
7272

73-
GOOS=windows GOARCH=amd64 go vet ./...
74-
GOOS=windows GOARCH=386 go vet ./...
73+
GOOS=windows GOARCH=amd64 go120 vet ./...
74+
GOOS=windows GOARCH=386 go120 vet ./...
7575

76-
GOOS=plan9 GOARCH=amd64 go vet ./...
77-
GOOS=plan9 GOARCH=386 go vet ./...
76+
GOOS=plan9 GOARCH=amd64 go120 vet ./...
77+
GOOS=plan9 GOARCH=386 go120 vet ./...
7878

7979
macos_test:
80-
CGO_ENABLED=0 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)
81-
CGO_ENABLED=1 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)
80+
CGO_ENABLED=0 GOOS=darwin go120 test ./... | $(BUILD_FAIL_PATTERN)
81+
CGO_ENABLED=1 GOOS=darwin go120 test ./... | $(BUILD_FAIL_PATTERN)
8282

8383
init_tools:
8484
go get github.com/golang/dep/cmd/dep

cpu/cpu_netbsd_amd64.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package cpu
2+
3+
type cpuTimes struct {
4+
User uint64
5+
Nice uint64
6+
Sys uint64
7+
Intr uint64
8+
Idle uint64
9+
}

disk/disk_netbsd_amd64.go

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mem/mem_bsd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//go:build freebsd || openbsd
2-
// +build freebsd openbsd
1+
//go:build freebsd || openbsd || netbsd
2+
// +build freebsd openbsd netbsd
33

44
package mem
55

0 commit comments

Comments
 (0)