diff --git a/attestation/Makefile b/attestation/Makefile index 38ba13b5d859237bb8caa788d66df561b3c0e901..4addc78b7e745a59d2e82ef2b7a5701db8fe6965 100644 --- a/attestation/Makefile +++ b/attestation/Makefile @@ -3,7 +3,7 @@ subdir = ras rac .PHONY: all build test clean install check all build test clean install check: - for name in $(subdir); do \ - make -C $$name $@;\ + for name in $(subdir); do\ + make -C $$name $@ || exit $$?;\ done diff --git a/attestation/rac/Makefile b/attestation/rac/Makefile index bba0f67d84c3a7d546dd88709cb625aec61cbcaf..e5c64a6fa6249835647792a455fb3be08ee5284a 100644 --- a/attestation/rac/Makefile +++ b/attestation/rac/Makefile @@ -1,10 +1,12 @@ +TESTEES=./raagent ./ractools ./rahub ./tbprovisioner + all: build test: - @echo "to be completed" + go test $(TESTEES) -build: +build: vendor go build -mod=vendor -o pkg/raagent raagent/*.go go build -mod=vendor -o pkg/ractools ractools/*.go go build -mod=vendor -o pkg/tbprovisioner tbprovisioner/*.go @@ -19,4 +21,7 @@ install: check: $(shell go env GOPATH)/bin/golangci-lint run -e gofmt -e gocyclo -e errorlint -e gosec -.PHONY: all build test clean install check +vendor: + go mod vendor + +.PHONY: all build test clean install check vendor diff --git a/attestation/ras/Makefile b/attestation/ras/Makefile index b61bbf7e784e14948e98ee0ec2de53ee8a6b663e..79b953eb30260305d38173a14784e71546020544 100644 --- a/attestation/ras/Makefile +++ b/attestation/ras/Makefile @@ -1,9 +1,10 @@ PKGPATH = pkg +TESTEES = ./cache ./clientapi ./cmd/ras ./config ./dao ./entity ./pca ./restapi ./trustmgr ./verifier all: build test: - @echo "to be completed" + go test $(TESTEES) build: vendor go build -mod=vendor -o $(PKGPATH)/ras cmd/ras/*.go