Compare commits
	
		
			3 commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| fba5551bb3 | |||
| 85671a076c | |||
| da35bf4bcf | 
					 2 changed files with 11 additions and 4 deletions
				
			
		
							
								
								
									
										13
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -3,6 +3,12 @@ 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
 | ||||
|  | @ -23,7 +29,8 @@ test: ## Test application and generate coverage report | |||
| 	$(MAKE) clean | ||||
| 	$(MAKE) $(COVEROUT) | ||||
| 
 | ||||
| $(COVEROUT): $(SOURCES) fmt | ||||
| $(COVEROUT): $(SOURCES) | ||||
| 	$(MAKE) fmt | ||||
| 	go test ./... -race -cover -coverprofile $@ | ||||
| 
 | ||||
| $(COVERHTML): $(COVEROUT) | ||||
|  | @ -33,8 +40,8 @@ $(COVERHTML): $(COVEROUT) | |||
| report: $(COVERHTML) ## Generate a coverage report
 | ||||
| 
 | ||||
| .PHONY: open-report | ||||
| open-report: report ## Open the coverage report in the default browser
 | ||||
| 	xdg-open $(COVERHTML) | ||||
| open-report: $(COVERHTML) ## Open the coverage report in the default browser
 | ||||
| 	$(OPEN) $< | ||||
| 
 | ||||
| .PHONY: build | ||||
| build: $(OUT) ## Builds the application
 | ||||
|  |  | |||
|  | @ -211,7 +211,7 @@ func (s *AppendTestSuite) TestConfLoadErr() { | |||
| 
 | ||||
| func (s *AppendTestSuite) TestMkdirErr() { | ||||
| 	// Don't run this test as root | ||||
| 	config.Overrides["input.path"] = "/root/my-logs-test" | ||||
| 	config.Overrides["input.path"] = "/var/my-logs-test" | ||||
| 	defer func(path string) { | ||||
| 		config.Overrides["input.path"] = path | ||||
| 	}(s.dir) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue