diff --git a/Makefile b/Makefile index d0e6266c..f83b45eb 100644 --- a/Makefile +++ b/Makefile @@ -108,6 +108,12 @@ ifndef DOCKER_IMAGE_NAME $(error DOCKER_IMAGE_NAME value is not set) endif +# OS-specific flags +TEST_FLAGS := -race +ifeq ($(OS),Windows_NT) + TEST_FLAGS := +endif + .PHONY: all build client client-watch docker lint lint-js lint-go test dependencies clean release docker-multi-arch all: build @@ -158,7 +164,7 @@ test: @echo Running JS unit-tests npm run test --prefix client @echo Running Go unit-tests - go test -race -v -bench=. -coverprofile=coverage.txt -covermode=atomic ./... + go test $(TEST_FLAGS) -v -coverprofile=coverage.txt -covermode=atomic ./... ci: client_with_deps go mod download diff --git a/dhcpd/nclient4/client.go b/dhcpd/nclient4/client.go index 02430ae9..144ab11c 100644 --- a/dhcpd/nclient4/client.go +++ b/dhcpd/nclient4/client.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build darwin dragonfly freebsd linux netbsd openbsd solaris // +build go1.12 // Package nclient4 is a small, minimum-functionality client for DHCPv4. diff --git a/dhcpd/nclient4/ipv4.go b/dhcpd/nclient4/ipv4.go index 5733eb46..5d961852 100644 --- a/dhcpd/nclient4/ipv4.go +++ b/dhcpd/nclient4/ipv4.go @@ -14,6 +14,7 @@ // // This file contains code taken from gVisor. +// +build darwin dragonfly freebsd linux netbsd openbsd solaris // +build go1.12 package nclient4