소스 검색

Makefile: add test target

Felix Lange 10 년 전
부모
커밋
c6b983e449
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 4
      Makefile

+ 7 - 4
Makefile

@@ -1,11 +1,8 @@
 # This Makefile is meant to be used by people that do not usually work
 # with Go source code. If you know what GOPATH is then you probably
 # don't need to bother with make.
-#
-# Note that there is no way to run the tests or do anything other than
-# building the binaries. This is by design.
 
-.PHONY: geth mist clean
+.PHONY: geth mist test clean
 GOBIN = build/bin
 
 geth:
@@ -18,5 +15,11 @@ mist:
 	@echo "Done building."
 	@echo "Run \"$(GOBIN)/mist --asset_path=cmd/mist/assets\" to launch mist."
 
+all:
+	build/env.sh go install -v $(shell build/ldflags.sh) ./...
+
+test: all
+	build/env.sh go test ./...
+
 clean:
 	rm -fr build/_workspace/pkg/ Godeps/_workspace/pkg $(GOBIN)/*