forked from OpenBazaar/openbazaar-go
-
Notifications
You must be signed in to change notification settings - Fork 3
/
test_compile.sh
executable file
·33 lines (29 loc) · 1.38 KB
/
test_compile.sh
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
#!/bin/bash
set -e
pwd
go test -coverprofile=api.cover.out ./api
go test -coverprofile=api.cover.out ./api/notifications
go test -coverprofile=bitcoin.cover.out ./bitcoin
go test -coverprofile=bitcoin.cover.out ./bitcoin/exchange
go test -coverprofile=bitcoin.cover.out ./bitcoin/listeners
go test -coverprofile=core.cover.out ./core
go test -coverprofile=ipfs.cover.out ./ipfs
go test -coverprofile=net.cover.out ./net
go test -coverprofile=netservice.cover.out ./net/service
go test -coverprofile=netservice.cover.out ./net/repointer
go test -coverprofile=netservice.cover.out ./net/retriever
go test -coverprofile=repo.cover.out ./repo
go test -coverprofile=repodb.cover.out ./repo/db
go test -coverprofile=storage.cover.out ./storage
go test -coverprofile=dropbox.cover.out ./storage/dropbox
go test -coverprofile=selfhosted.cover.out ./storage/selfhosted
echo "mode: set" > coverage.out && cat *.cover.out | grep -v mode: | sort -r | \
awk '{if($1 != last) {print $0;last=$1}}' >> coverage.out
rm -rf *.cover.out
# Maybe activate someday, but right now this takes a long time and has a hard time
# running without some kind of failure due to timeout lengths.
#wget https://bitcoin.org/bin/bitcoin-core-0.13.0/bitcoin-0.13.0-x86_64-linux-gnu.tar.gz
#tar -xvzf bitcoin-0.13.0-x86_64-linux-gnu.tar.gz -C /tmp
#cd qa
#chmod a+x runtests.sh
#./runtests.sh $GOPATH/bin/openbazaar-go /tmp/bitcoin-0.13.0/bin/bitcoind