| 1 |
.PHONY: all |
| 2 |
all: test |
| 3 |
|
| 4 |
.PHONY: test_build_darwin_arm64 |
| 5 |
test_build_darwin_arm64: |
| 6 |
GOOS=darwin GOARCH=arm64 go test -c -o /dev/null |
| 7 |
|
| 8 |
.PHONY: test_build_darwin_amd64 |
| 9 |
test_build_darwin_amd64: |
| 10 |
GOOS=darwin GOARCH=amd64 go test -c -o /dev/null |
| 11 |
|
| 12 |
.PHONY: test_build_linux_arm64 |
| 13 |
test_build_linux_arm64: |
| 14 |
GOOS=linux GOARCH=arm64 go test -c -o /dev/null |
| 15 |
|
| 16 |
.PHONY: test_build_linux_amd64 |
| 17 |
test_build_linux_amd64: |
| 18 |
GOOS=linux GOARCH=amd64 go test -c -o /dev/null |
| 19 |
|
| 20 |
.PHONY: test_build_windows_amd64 |
| 21 |
test_build_windows_amd64: |
| 22 |
GOOS=windows GOARCH=amd64 go test -c -o /dev/null |
| 23 |
|
| 24 |
.PHONY: test_build_windows_arm64 |
| 25 |
test_build_windows_arm64: |
| 26 |
GOOS=windows GOARCH=arm64 go test -c -o /dev/null |
| 27 |
|
| 28 |
.PHONY: test_build_freebsd_amd64 |
| 29 |
test_build_freebsd_amd64: |
| 30 |
GOOS=freebsd GOARCH=amd64 go test -c -o /dev/null |
| 31 |
|
| 32 |
.PHONY: test_build_openbsd_amd64 |
| 33 |
test_build_openbsd_amd64: |
| 34 |
GOOS=openbsd GOARCH=amd64 go test -c -o /dev/null |
| 35 |
|
| 36 |
.PHONY: test_build_netbsd_amd64 |
| 37 |
test_build_netbsd_amd64: |
| 38 |
GOOS=netbsd GOARCH=amd64 go test -c -o /dev/null |
| 39 |
|
| 40 |
.PHONY: test_build_dragonfly_amd64 |
| 41 |
test_build_dragonfly_amd64: |
| 42 |
GOOS=dragonfly GOARCH=amd64 go test -c -o /dev/null |
| 43 |
|
| 44 |
.PHONY: test_build_solaris_amd64 |
| 45 |
test_build_solaris_amd64: |
| 46 |
GOOS=solaris GOARCH=amd64 go test -c -o /dev/null |
| 47 |
|
| 48 |
.PHONY: test_build_wasip1_wasm |
| 49 |
test_build_wasip1_wasm: |
| 50 |
@# Ignore versions before 1.21 |
| 51 |
go version | grep -qE 'go1\.(20|1[0-9])' || \ |
| 52 |
GOOS=wasip1 GOARCH=wasm go test -c -o /dev/null |
| 53 |
|
| 54 |
.PHONY: test_build_aix_ppc64 |
| 55 |
test_build_aix_ppc64: |
| 56 |
GOOS=aix GOARCH=ppc64 go test -c -o /dev/null |
| 57 |
|
| 58 |
.PHONY: test_build_js_wasm |
| 59 |
test_build_js_wasm: |
| 60 |
GOOS=js GOARCH=wasm go test -c -o /dev/null |
| 61 |
|
| 62 |
# TODO: clean this up and add all supported targets |
| 63 |
# |
| 64 |
# Test that we can build fastwalk on multiple platforms |
| 65 |
.PHONY: test_build |
| 66 |
test_build: \ |
| 67 |
test_build_aix_ppc64 \ |
| 68 |
test_build_darwin_amd64 \ |
| 69 |
test_build_darwin_arm64 \ |
| 70 |
test_build_dragonfly_amd64 \ |
| 71 |
test_build_freebsd_amd64 \ |
| 72 |
test_build_js_wasm \ |
| 73 |
test_build_linux_amd64 \ |
| 74 |
test_build_linux_arm64 \ |
| 75 |
test_build_netbsd_amd64 \ |
| 76 |
test_build_openbsd_amd64 \ |
| 77 |
test_build_solaris_amd64 \ |
| 78 |
test_build_wasip1_wasm \ |
| 79 |
test_build_windows_amd64 \ |
| 80 |
test_build_windows_arm64 |
| 81 |
|
| 82 |
.PHONY: test |
| 83 |
test: # runs all tests against the package with race detection and coverage percentage |
| 84 |
@go test -race -cover ./... |
| 85 |
|
| 86 |
.PHONY: quick |
| 87 |
quick: # runs all tests without coverage or the race detector |
| 88 |
@go test ./... |
| 89 |
|
| 90 |
.PHONY: bench |
| 91 |
bench: |
| 92 |
go test -run '^$$' -bench . -benchmem ./... |
| 93 |
|
| 94 |
.PHONY: bench_comp |
| 95 |
bench_comp: |
| 96 |
@go run ./scripts/bench_comp.go |
| 97 |
|
| 98 |
.PHONY: clean |
| 99 |
clean: |
| 100 |
@go clean |
| 101 |
|