| 1 |
# Run tests |
| 2 |
# |
| 3 |
# Copyright (c) 2014 Christian Couder |
| 4 |
# MIT Licensed; see the LICENSE file in this repository. |
| 5 |
# |
| 6 |
|
| 7 |
# NOTE: run with TEST_VERBOSE=1 for verbose sharness tests. |
| 8 |
|
| 9 |
T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)) |
| 10 |
BINS = bin/multihash |
| 11 |
SHARNESS = lib/sharness/sharness.sh |
| 12 |
MULTIHASH_CMD = ../../multihash |
| 13 |
MULTIHASH_ROOT = ../../ |
| 14 |
|
| 15 |
all: clean deps $(T) aggregate |
| 16 |
|
| 17 |
clean: |
| 18 |
@echo "*** $@ ***" |
| 19 |
-rm -rf test-results |
| 20 |
-rm -rf $(BINS) |
| 21 |
|
| 22 |
$(T): |
| 23 |
@echo "*** $@ ***" |
| 24 |
./$@ |
| 25 |
|
| 26 |
aggregate: |
| 27 |
@echo "*** $@ ***" |
| 28 |
lib/test-aggregate-results.sh |
| 29 |
|
| 30 |
deps: $(SHARNESS) $(BINS) |
| 31 |
|
| 32 |
$(SHARNESS): |
| 33 |
@echo "*** installing $@ ***" |
| 34 |
lib/install-sharness.sh |
| 35 |
|
| 36 |
bin/multihash: $(MULTIHASH_ROOT)/**/*.go |
| 37 |
go build -o bin/multihash $(MULTIHASH_CMD) |
| 38 |
|
| 39 |
bins: $(BINS) |
| 40 |
|
| 41 |
.PHONY: all clean $(T) aggregate |