提交 dbf91a19 作者: Christian Couder

test/sharness: add GOFLAGS variable and race target

The GOFLAGS variable makes it possible to run all sharness
tests with go binaries built with some special flags.

The "race" target makes it easy run the sharness tests
with go binaries built with the -race flag.

License: MIT
Signed-off-by: 's avatarChristian Couder <chriscool@tuxfamily.org>
上级 61550d08
......@@ -11,6 +11,9 @@ BINS = bin/random bin/multihash bin/ipfs bin/pollEndpoint
SHARNESS = lib/sharness/sharness.sh
IPFS_ROOT = ../..
# User might want to override those on the command line
GOFLAGS =
all: clean deps $(T) aggregate
clean:
......@@ -32,11 +35,13 @@ $(SHARNESS):
@echo "*** installing $@ ***"
lib/install-sharness.sh
bin/%: $(IPFS_ROOT)/**/*.go
@echo "*** installing $@ ***"
cd .. && make $@
bin/%: FORCE
cd .. && make GOFLAGS=$(GOFLAGS) $@
race:
make GOFLAGS=-race all
.PHONY: all clean $(T) aggregate
.PHONY: all clean $(T) aggregate FORCE
# will fail if curl is not installed.
# TODO: get rid of this and install curl with git or ipfs.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论