mirror of
				https://github.com/prometheus/node_exporter.git
				synced 2025-08-20 18:33:52 -07:00 
			
		
		
		
	Merge pull request #682 from derekmarcotte/dm-386-native
Only enable race detector when GOHOSTARCH is amd64.
This commit is contained in:
		
						commit
						ba96b6561b
					
				
							
								
								
									
										8
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
									
									
									
									
								
							|  | @ -14,6 +14,7 @@ | |||
| GO     ?= GO15VENDOREXPERIMENT=1 go | ||||
| GOPATH := $(firstword $(subst :, ,$(shell $(GO) env GOPATH))) | ||||
| GOARCH := $(shell $(GO) env GOARCH) | ||||
| GOHOSTARCH := $(shell $(GO) env GOHOSTARCH) | ||||
| 
 | ||||
| PROMU       ?= $(GOPATH)/bin/promu | ||||
| STATICCHECK ?= $(GOPATH)/bin/staticcheck | ||||
|  | @ -26,6 +27,11 @@ DOCKER_IMAGE_TAG        ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) | |||
| MACH                    ?= $(shell uname -m) | ||||
| DOCKERFILE              ?= Dockerfile | ||||
| 
 | ||||
| ifeq ($(GOHOSTARCH),amd64) | ||||
| 	# Only supported on amd64 | ||||
| 	test-flags := -race | ||||
| endif | ||||
| 
 | ||||
| ifeq ($(OS),Windows_NT) | ||||
|     OS_detected := Windows | ||||
| else | ||||
|  | @ -63,7 +69,7 @@ style: | |||
| 
 | ||||
| test: collector/fixtures/sys/.unpacked | ||||
| 	@echo ">> running tests" | ||||
| 	@$(GO) test -short -race $(pkgs) | ||||
| 	$(GO) test -short $(test-flags) $(pkgs) | ||||
| 
 | ||||
| test-32bit: collector/fixtures/sys/.unpacked | ||||
| 	@echo ">> running tests in 32-bit mode" | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue