mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-27 05:17:49 +08:00
As shasum is not installed on all machines and we use multihash anyway in the code base, it removes one dependency to use shasum instead of shasum in the tests. Now that there are sharness tests in multihash it is also safe to use it. License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
46 lines
968 B
Makefile
46 lines
968 B
Makefile
# Run tests
|
|
#
|
|
# Copyright (c) 2014 Christian Couder
|
|
# MIT Licensed; see the LICENSE file in this repository.
|
|
#
|
|
|
|
# NOTE: run with TEST_VERBOSE=1 for verbose sharness tests.
|
|
|
|
T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
|
|
BINS = bin/random bin/multihash bin/ipfs
|
|
SHARNESS = lib/sharness/sharness.sh
|
|
IPFS_ROOT = ../..
|
|
|
|
all: clean deps $(T) aggregate
|
|
|
|
clean:
|
|
@echo "*** $@ ***"
|
|
-rm -rf test-results
|
|
-rm -rf bin/ipfs
|
|
|
|
$(T):
|
|
@echo "*** $@ ***"
|
|
./$@
|
|
|
|
aggregate:
|
|
@echo "*** $@ ***"
|
|
lib/test-aggregate-results.sh
|
|
|
|
deps: $(SHARNESS) $(BINS) curl
|
|
|
|
$(SHARNESS):
|
|
@echo "*** installing $@ ***"
|
|
lib/install-sharness.sh
|
|
|
|
bin/%: $(IPFS_ROOT)/**/*.go
|
|
@echo "*** installing $@ ***"
|
|
cd .. && make $@
|
|
|
|
.PHONY: all clean $(T) aggregate
|
|
|
|
# will fail if curl is not installed.
|
|
# TODO: get rid of this and install curl with git or ipfs.
|
|
install_curl_pls = "curl is required to run tests. please install it"
|
|
curl:
|
|
@which curl >/dev/null || (echo "$(install_curl_pls)" && false)
|