forked from ipfs/js-ipfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (38 loc) · 1.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Run sharness tests
#
# Copyright (c) 2016 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))
LIBDIR = lib
SHARNESSDIR = sharness
AGGREGATE = $(LIBDIR)/$(SHARNESSDIR)/aggregate-results.sh
BINS = ../bin/ipfs
all: aggregate
help:
@echo "- use 'make' or 'make all' to run all the tests"
@echo "- use 'make deps' to create an 'ipfs' executable in ../bin"
@echo "- to run tests manually, make sure to include ../bin in your PATH"
clean: clean-test-results
@echo "*** $@ ***"
-rm -rf ../bin/ipfs
clean-test-results:
@echo "*** $@ ***"
-rm -rf test-results
$(T): clean-test-results deps
@echo "*** $@ ***"
./$@
aggregate: clean-test-results $(T)
@echo "*** $@ ***"
ls test-results/t*-*.sh.*.counts | $(AGGREGATE)
deps: sharness $(BINS) curl
sharness:
@echo "*** checking $@ ***"
lib/install-sharness.sh
../bin/ipfs:
mkdir -p ../bin
cd ../bin && ln -s ../../src/cli/bin.js ipfs
curl:
@which curl >/dev/null || (echo "Please install curl!" && false)
.PHONY: all help clean clean-test-results $(T) aggregate deps sharness