mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-05 00:08:06 +08:00
Merge pull request #1032 from torarnv/cleanup-makefiles
Fix various issues in the test makefiles
This commit is contained in:
commit
20dbea5e5c
@ -18,19 +18,21 @@ clean:
|
||||
|
||||
bins: $(BINS)
|
||||
|
||||
bin/random: $(RANDOM_SRC)/**/*.go IPFS-BUILD-OPTIONS
|
||||
find_go_files = $(shell find $(1) -name "*.go")
|
||||
|
||||
bin/random: $(call find_go_files, $(RANDOM_SRC)) IPFS-BUILD-OPTIONS
|
||||
@echo "*** installing $@ ***"
|
||||
go build $(GOFLAGS) -o bin/random $(RANDOM_SRC)/random
|
||||
|
||||
bin/multihash: $(MULTIHASH_SRC)/**/*.go IPFS-BUILD-OPTIONS
|
||||
bin/multihash: $(call find_go_files, $(MULTIHASH_SRC)) IPFS-BUILD-OPTIONS
|
||||
@echo "*** installing $@ ***"
|
||||
go build $(GOFLAGS) -o bin/multihash $(MULTIHASH_SRC)/multihash
|
||||
|
||||
bin/ipfs: $(IPFS_ROOT)/**/*.go IPFS-BUILD-OPTIONS
|
||||
bin/ipfs: $(call find_go_files, $(IPFS_ROOT)) IPFS-BUILD-OPTIONS
|
||||
@echo "*** installing $@ ***"
|
||||
go build $(GOFLAGS) -o bin/ipfs $(IPFS_CMD)
|
||||
|
||||
bin/pollEndpoint: $(POLLENDPOINT_SRC)/*.go IPFS-BUILD-OPTIONS
|
||||
bin/pollEndpoint: $(call find_go_files, $(POLLENDPOINT_SRC)) IPFS-BUILD-OPTIONS
|
||||
@echo "*** installing $@ ***"
|
||||
go build $(GOFLAGS) -o bin/pollEndpoint $(POLLENDPOINT_SRC)
|
||||
|
||||
|
||||
@ -14,9 +14,11 @@ shift
|
||||
shift
|
||||
FLAG_MSGS="$@"
|
||||
|
||||
test -f $FLAG_FILE || touch $FLAG_FILE
|
||||
|
||||
# Use x in front of tested values as flags could be
|
||||
# interpreted by "test" to be for itself.
|
||||
if test x"$FLAG_VALS" != x"$(cat "$FLAG_FILE" 2>/dev/null)"
|
||||
if test x"$FLAG_VALS" != x"$(cat "$FLAG_FILE")"
|
||||
then
|
||||
echo "$FLAG_MSGS"
|
||||
echo "$FLAG_VALS" >"$FLAG_FILE"
|
||||
|
||||
@ -14,18 +14,21 @@ IPFS_ROOT = ../..
|
||||
# User might want to override those on the command line
|
||||
GOFLAGS =
|
||||
|
||||
all: clean deps $(T) aggregate
|
||||
all: aggregate
|
||||
|
||||
clean:
|
||||
clean: clean-test-results
|
||||
@echo "*** $@ ***"
|
||||
-rm -rf test-results
|
||||
-rm -rf bin/ipfs
|
||||
|
||||
$(T):
|
||||
clean-test-results:
|
||||
@echo "*** $@ ***"
|
||||
-rm -rf test-results
|
||||
|
||||
$(T): clean-test-results deps
|
||||
@echo "*** $@ ***"
|
||||
./$@
|
||||
|
||||
aggregate:
|
||||
aggregate: clean-test-results $(T)
|
||||
@echo "*** $@ ***"
|
||||
lib/test-aggregate-results.sh
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user