Add make tests target, which runs tests inside build container.

This commit is contained in:
Tom Wilkie
2015-10-26 15:23:00 +00:00
parent 011a55358f
commit 18a1354075
2 changed files with 12 additions and 2 deletions

View File

@@ -103,6 +103,16 @@ clean:
rm -rf $(SCOPE_EXPORT) $(SCOPE_UI_BUILD_UPTODATE) $(SCOPE_BACKEND_BUILD_UPTODATE) \
$(APP_EXE) $(PROBE_EXE) $(RUNSVINIT) client/build/app.js docker/weave
ifeq ($(BUILD_IN_CONTAINER),true)
tests:
$(SUDO) docker run -ti $(RM) -v $(shell pwd):/go/src/github.com/weaveworks/scope \
-e GOARCH -e GOOS \ --entrypoint=/bin/sh $(SCOPE_BACKEND_BUILD_IMAGE) -c \
"cd /go/src/github.com/weaveworks/scope && ./tools/test"
else
tests:
./tools/test
endif
deps:
go get -u -f -tags netgo \
github.com/golang/lint/golint \

View File

@@ -41,13 +41,13 @@ dependencies:
test:
override:
- cd $SRCDIR; $TOOLS/lint .
- cd $SRCDIR; ./tools/lint .
- cd $SRCDIR; make RM= tests
- cd $SRCDIR; make RM= client-test
- cd $SRCDIR; make RM= static
- cd $SRCDIR; rm -f app/scope-app probe/scope-probe; GOARCH=arm make RM= backend
- cd $SRCDIR; rm -f app/scope-app probe/scope-probe; GOOS=darwin make RM= backend
- cd $SRCDIR; rm -f app/scope-app probe/scope-probe; make RM=
- cd $SRCDIR; $TOOLS/test -slow
- cd $SRCDIR/experimental; make
- test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; ./gce.sh setup)
- test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; eval $(./gce.sh hosts); ./setup.sh)