Skip to content

Conversation

@naveenchlsni
Copy link

@naveenchlsni naveenchlsni commented Nov 16, 2023

Issue
Make build produces following error

curl "https://raw.githubusercontent.com/golang/dep/master/install.sh" | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5230  100  5230    0     0   120k      0 --:--:-- --:--:-- --:--:--  130k
Architecture arm64 is not supported by this installation script
make: *** [/Users/naveen.chalasani/code/aws-dax-go/gopath/bin/dep] Error 1

Above is because dep is not supported on macOS / M1 host as its archived.

Description of changes:

  1. Removing the project dependency on dep and moving this to use go modules as dep is deprecated

  2. Modified go test command to generate coveragereport.

Test cases executed

Verified make test runs successfully.

naveen.chalasani@SW-LP16884 aws-dax-go % make test 
SHELL=/bin/sh GOOS= go test  -coverprofile=coverageunit.out -covermode=atomic -v -tags "" -run . github.com/aws/aws-dax-go github.com/aws/aws-dax-go/dax github.com/aws/aws-dax-go/dax/internal/cbor github.com/aws/aws-dax-go/dax/internal/client github.com/aws/aws-dax-go/dax/internal/lru github.com/aws/aws-dax-go/dax/internal/parser github.com/aws/aws-dax-go/dax/internal/parser/generated github.com/aws/aws-dax-go/dax/internal/proxy
naveen.chalasani@SW-LP16884 aws-dax-go % go test ./... 
?   	github.com/aws/aws-dax-go	[no test files]
ok  	github.com/aws/aws-dax-go/dax	(cached)
ok  	github.com/aws/aws-dax-go/dax/internal/cbor	(cached)
ok  	github.com/aws/aws-dax-go/dax/internal/client	(cached)
ok  	github.com/aws/aws-dax-go/dax/internal/lru	(cached)
ok  	github.com/aws/aws-dax-go/dax/internal/parser	(cached)
?   	github.com/aws/aws-dax-go/dax/internal/parser/generated	[no test files]
?   	github.com/aws/aws-dax-go/dax/internal/proxy	[no test files]

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@naveenchlsni naveenchlsni changed the title Migrate to go mod Migrate to go modules Nov 16, 2023

test: $(SOURCES) vendor
SHELL=/bin/sh GOOS= go test -v -tags "$(TAGS)" -run $(TEST) $(PKGS)
SHELL=/bin/sh GOOS= go test -coverprofile=coverageunit.out -covermode=atomic -v -tags "$(TAGS)" -run $(TEST) $(PKGS)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to add -race to detect data races

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants