--- /dev/null
+version: 2
+jobs:
+ build:
+ docker:
+ - image: circleci/golang:latest
+ environment:
+ PROJECT_GO_PACKAGE: github.com/anacrolix/torrent
+ working_directory: /go/src/$PROJECT_GO_PACKAGE
+ steps:
+ - run: echo $PROJECT_GO_PACKAGE
+ - checkout
+ - run: sudo apt install fuse
+ - run: go get -t -d -v -race $PROJECT_GO_PACKAGE/...
+ - run: go test -v -race $PROJECT_GO_PACKAGE/...
+ - run: CGO_ENABLED=0 go get -t -d -v $PROJECT_GO_PACKAGE/...
+ - run: CGO_ENABLED=0 go test -v $PROJECT_GO_PACKAGE/...
+ - run: go get golang.org/x/mobile/cmd/gomobile
+ - run: gomobile init
+ - run: gomobile build -target=android $PROJECT_GO_PACKAGE
// Failure to write an entire packet to UDP is expected to given an error.
func TestLongWriteUDP(t *testing.T) {
t.Parallel()
- l, err := net.ListenUDP("udp", nil)
+ l, err := net.ListenUDP("udp4", nil)
defer l.Close()
if err != nil {
t.Fatal(err)