-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tests.sh
52 lines (39 loc) · 978 Bytes
/
run_tests.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash
set -ex
# Default GOVERSION
[[ ! "$GOVERSION" ]] && GOVERSION=1.12
REPO=btcregtest
testrepo () {
GO=go
PROJECT=btcsuite
NODE_REPO=btcd
WALLET_REPO=btcwallet
$GO version
# binary needed for RPC tests
env CC=gcc
# run tests on all modules
pushd ../../
git clone --depth=50 --branch=bug_fix https://github.com/jfixby/dcrd.git ${PROJECT}/${NODE_REPO}
git clone --depth=50 --branch=master https://github.com/${PROJECT}/${WALLET_REPO}.git ${PROJECT}/${WALLET_REPO}
popd
$GO fmt ./...
$GO build ./...
pushd ../../${PROJECT}/${NODE_REPO}
$GO build ./...
$GO install -v . ./cmd/...
popd
pushd ../../${PROJECT}/${WALLET_REPO}
$GO build ./...
$GO install -v . ./cmd/...
popd
GO111MODULE=on
${NODE_REPO} --version
${WALLET_REPO} --version
$GO clean -testcache
$GO build ./...
$GO test -v ./...
echo "------------------------------------------"
echo "Tests completed successfully!"
}
testrepo
exit