mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 02:47:48 +08:00
@jbenet @chriscool (not to be merged into master) This is a hack to run sharness tests on th ipfs2 binary. Instead of compiling cmd/ipfs, it compiles cmd/ipfs2 and copies this into test/bin/ipfs. I thought this would be enough to pass the `basic-commands` test, but it's not. Although the output is fairly similar, the `ipfs version` test fails. ``` test (feat/test2) λ. diff version1 version2 1c1 < ipfs version 0.1.7 --- > ipfs version 0.1.5 ``` I'm not very experienced with `sh` scripting, so perhaps I'm missing a key ingredient or maybe misunderstanding the the tests are meant to work. Would like to get input on this. Thanks, @maybebtc
44 lines
856 B
Makefile
44 lines
856 B
Makefile
# Run tests
|
|
#
|
|
# Copyright (c) 2014 Christian Couder
|
|
# MIT Licensed; see the LICENSE file in this repository.
|
|
#
|
|
|
|
T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
|
|
SHARNESS = lib/sharness/sharness.sh
|
|
RANDOMSRC = Godeps/_workspace/src/github.com/jbenet/go-random/random
|
|
|
|
all: clean deps $(T) aggregate
|
|
|
|
clean:
|
|
@echo "*** $@ ***"
|
|
-rm -r test-results
|
|
|
|
$(T):
|
|
@echo "*** $@ ***"
|
|
./$@
|
|
|
|
aggregate:
|
|
@echo "*** $@ ***"
|
|
lib/test-aggregate-results.sh
|
|
|
|
deps: $(SHARNESS) ipfs random
|
|
|
|
$(SHARNESS):
|
|
@echo "*** installing $@ ***"
|
|
lib/install-sharness.sh
|
|
|
|
# phony to ensure we re-build it every time we run tests
|
|
ipfs:
|
|
@echo "*** installing $@ ***"
|
|
mkdir -p bin
|
|
cd ../cmd/ipfs2 && go build
|
|
cp ../cmd/ipfs2/ipfs2 bin/ipfs
|
|
|
|
random:
|
|
@echo "*** installing $@ ***"
|
|
mkdir -p bin
|
|
go build -o bin/random ../$(RANDOMSRC)
|
|
|
|
.PHONY: all clean $(T) aggregate ipfs random
|