提交 7b49419d 作者: Tor Arne Vestbø

Fix dependencies in sharness test makefile

Running make -jN would result in the tests starting to execute
before the tests binaries were built, resulting in the error:

 "Cannot find the tests' local ipfs tool"

Each test now depends on the deps. They also depend on a new
target for cleaning the test results, so that the tests can
write new clean results.

The aggregate target also needs to depend on the same test
results clean target, as well as the tests themselves, so
that the aggregation happens when all tests have finished
running.

By introducing a separate target for cleaning test results we
also ensure that we don't end up removing and rebuilding
the binary on each test run.

The result is that the tests *can* be run with with -jN > 1,
but individual tests may still not supports this, so to get
stable test results it's still recommended to run them in
sequence.
上级 d36a9eef
...@@ -14,18 +14,21 @@ IPFS_ROOT = ../.. ...@@ -14,18 +14,21 @@ IPFS_ROOT = ../..
# User might want to override those on the command line # User might want to override those on the command line
GOFLAGS = GOFLAGS =
all: clean deps $(T) aggregate all: aggregate
clean: clean: clean-test-results
@echo "*** $@ ***" @echo "*** $@ ***"
-rm -rf test-results
-rm -rf bin/ipfs -rm -rf bin/ipfs
$(T): clean-test-results:
@echo "*** $@ ***"
-rm -rf test-results
$(T): clean-test-results deps
@echo "*** $@ ***" @echo "*** $@ ***"
./$@ ./$@
aggregate: aggregate: clean-test-results $(T)
@echo "*** $@ ***" @echo "*** $@ ***"
lib/test-aggregate-results.sh lib/test-aggregate-results.sh
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论