From e3b519cdd8553821ffc2bc338a7a86f548cc9783 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Sat, 13 Feb 2016 16:01:29 +0100 Subject: [PATCH] Do some build / test-integration fixes - target generate-webui depends on build-webui - generate-webui will run only if the folder static does not exists - create compose project before starting it >_<'', otherwise it does nothing :'D Signed-off-by: Vincent Demeester --- Makefile | 18 ++++++++++-------- integration/integration_test.go | 6 +++++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index e9d9ada15..9b7d622aa 100644 --- a/Makefile +++ b/Makefile @@ -24,13 +24,13 @@ print-%: ; @echo $*=$($*) default: binary -all: build-webui build +all: generate-webui build $(DOCKER_RUN_TRAEFIK) ./script/make.sh -binary: build-webui generate-webui build +binary: generate-webui build $(DOCKER_RUN_TRAEFIK) ./script/make.sh generate binary -crossbinary: build-webui generate-webui build +crossbinary: generate-webui build $(DOCKER_RUN_TRAEFIK) ./script/make.sh generate crossbinary test: build @@ -77,13 +77,15 @@ run-dev: go build ./traefik -generate-webui: - mkdir -p static - docker run --rm -v "$$PWD/static":'/src/static' traefik-webui gulp - echo 'For more informations show `webui/readme.md`' > $$PWD/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md +generate-webui: build-webui + if [ ! -d "static" ]; then \ + mkdir -p static; \ + docker run --rm -v "$$PWD/static":'/src/static' traefik-webui gulp; \ + echo 'For more informations show `webui/readme.md`' > $$PWD/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md; \ + fi lint: $(foreach file,$(SRCS),golint $(file) || exit;) fmt: - gofmt -s -l -w $(SRCS) \ No newline at end of file + gofmt -s -l -w $(SRCS) diff --git a/integration/integration_test.go b/integration/integration_test.go index 72d992bd9..27b6d41f5 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -87,6 +87,9 @@ func (s *BaseSuite) createComposeProject(c *check.C, name string) { c.Assert(err, checker.IsNil) s.composeProject = composeProject + err = composeProject.Create() + c.Assert(err, checker.IsNil) + s.started = make(chan bool) s.stopped = make(chan bool) s.deleted = make(chan bool) @@ -96,7 +99,8 @@ func (s *BaseSuite) createComposeProject(c *check.C, name string) { composeProject.AddListener(s.listenChan) - composeProject.Start() + err = composeProject.Start() + c.Assert(err, checker.IsNil) // Wait for compose to start <-s.started