-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
31 lines (21 loc) · 937 Bytes
/
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
TEST_FLAGS ?= -p 1 -v
all:
@echo "See Makefile contents for details."
bootstrap:
cd ./testutil/chain && yarn install
test: wait-on-chain check-testchain-running go-test
go-test:
go clean -testcache && go test $(TEST_FLAGS) -run=$(TEST) ./...
test-concurrently:
cd ./testutil/chain && yarn test
start-testchain:
cd ./testutil/chain && yarn start:geth
start-testchain-verbose:
cd ./testutil/chain && yarn start:geth:verbose
clean:
@go clean -testcache
check-testchain-running:
@curl http://localhost:8545 -H"Content-type: application/json" -X POST -d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' --write-out '%{http_code}' --silent --output /dev/null | grep 200 > /dev/null \
|| { echo "*****"; echo "Oops! testchain is not running. Please run 'make start-testchain' in another terminal or use 'test-concurrently'."; echo "*****"; exit 1; }
wait-on-chain:
cd ./testutil/chain && yarn wait:server