diff --git a/Makefile b/Makefile index a3d8581..35491dc 100644 --- a/Makefile +++ b/Makefile @@ -3,12 +3,6 @@ OUT=my-log GOBIN=$(shell go env GOBIN) COVEROUT=cover.out COVERHTML=cover.html -OPEN=xdg-open -OS=$(shell uname -s) - -ifeq ($(OS),Darwin) -OPEN=open -endif .PHONY: help help: ## Show help for documented recipes @@ -29,8 +23,7 @@ test: ## Test application and generate coverage report $(MAKE) clean $(MAKE) $(COVEROUT) -$(COVEROUT): $(SOURCES) - $(MAKE) fmt +$(COVEROUT): $(SOURCES) fmt go test ./... -race -cover -coverprofile $@ $(COVERHTML): $(COVEROUT) @@ -40,8 +33,8 @@ $(COVERHTML): $(COVEROUT) report: $(COVERHTML) ## Generate a coverage report .PHONY: open-report -open-report: $(COVERHTML) ## Open the coverage report in the default browser - $(OPEN) $< +open-report: report ## Open the coverage report in the default browser + xdg-open $(COVERHTML) .PHONY: build build: $(OUT) ## Builds the application diff --git a/files/append_test.go b/files/append_test.go index 03f0253..0976363 100644 --- a/files/append_test.go +++ b/files/append_test.go @@ -211,7 +211,7 @@ func (s *AppendTestSuite) TestConfLoadErr() { func (s *AppendTestSuite) TestMkdirErr() { // Don't run this test as root - config.Overrides["input.path"] = "/var/my-logs-test" + config.Overrides["input.path"] = "/root/my-logs-test" defer func(path string) { config.Overrides["input.path"] = path }(s.dir)