Skip to content

Commit 91c91a7

Browse files
authored
Merge branch 'master' into modules
2 parents abe3784 + f65d91d commit 91c91a7

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ script:
3131
- export GOOS=${TRAVIS_GOOS}
3232
- make build binaries
3333
- if [ "$GOOS" = "linux" ]; then make vet test; fi
34+
- if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make root-test; fi
3435
- if [ "$GOOS" != "linux" ]; then make test-compile; fi
3536

3637
jobs:

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,18 @@ VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
2020

2121
GO_LDFLAGS=-ldflags "-X `go list -mod=vendor ./version`.Version=$(VERSION)"
2222

23+
PKG=github.com/containerd/continuity
24+
2325
PACKAGES=$(shell go list -mod=vendor ./... | grep -v /vendor/)
26+
TEST_REQUIRES_ROOT_PACKAGES=$(filter \
27+
${PACKAGES}, \
28+
$(shell \
29+
for f in $$(git grep -l testutil.RequiresRoot | grep -v Makefile); do \
30+
d="$$(dirname $$f)"; \
31+
[ "$$d" = "." ] && echo "${PKG}" && continue; \
32+
echo "${PKG}/$$d"; \
33+
done | sort -u) \
34+
)
2435

2536
.PHONY: clean all fmt vet lint build test binaries
2637
.DEFAULT: default
@@ -64,6 +75,10 @@ test:
6475
@echo "+ $@"
6576
@go test -mod=vendor $(PACKAGES)
6677

78+
root-test:
79+
@echo "+ $@"
80+
@go test ${TEST_REQUIRES_ROOT_PACKAGES} -test.root
81+
6782
test-compile:
6883
@echo "+ $@"
6984
@for pkg in $(PACKAGES); do go test -mod=vendor -c $$pkg; done

0 commit comments

Comments
 (0)