浏览代码

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)/*