我正在构建一个我需要测试的针对 Wasm 的 go 模块。
当前配置
配置travis.yml:
language: go
go:
- 1.11.x
before_install:
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- dep ensure
以及以下内容makefile:
all: deps test
deps:
GOOS=js GOARCH=wasm go get ./...
test:
GOOS=js GOARCH=wasm go test ./...
test-cover:
$(GOPATH)/bin/mockgen -source=dom/dom.go -destination=mock/dom.go -package=mock
$(GOPATH)/bin/mockgen -source=vnode.go -destination=mock/node.go -package=mock
GOOS=js GOARCH=wasm go test ./... -coverprofile=cover.out
go tool cover -html=cover.out
我的go env:
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/marvinfrachet/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/marvinfrachet/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/t0/7bv6yclx1d913wtl6rdsvjtr0000gn/T/go-build435765871=/tmp/go-build -gno-record-gcc-switches -fno-common"
万千封印
相关分类