forked from yihuang/gravity-bridge
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
81 lines (65 loc) · 3.35 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
.DEFAULT_GOAL := e2e_slow_loris
e2e_build_images:
@docker build -t gravity:prebuilt -f module/Dockerfile module/
@docker build -t ethereum:prebuilt -f integration_tests/ethereum/Dockerfile .
@docker build -t orchestrator:prebuilt -f orchestrator/Dockerfile orchestrator/
e2e_slow_loris:
@make -s e2e_happy_path
@make -s e2e_orchestrator_keys
@make -s e2e_arbitrary_logic
@make -s e2e_validator_out
@make -s e2e_batch_stress
@make -s e2e_valset_stress
@make -s e2e_transaction_stress
e2e_clean_slate:
@docker rm --force \
$(shell docker ps -qa --filter="name=contract_deployer") \
$(shell docker ps -qa --filter="name=ethereum") \
$(shell docker ps -qa --filter="name=gravity") \
$(shell docker ps -qa --filter="name=orchestrator") \
1>/dev/null \
2>/dev/null \
|| true
@docker wait \
$(shell docker ps -qa --filter="name=contract_deployer") \
$(shell docker ps -qa --filter="name=ethereum") \
$(shell docker ps -qa --filter="name=gravity") \
$(shell docker ps -qa --filter="name=orchestrator") \
1>/dev/null \
2>/dev/null \
|| true
@docker network prune --force 1>/dev/null 2>/dev/null || true
@cd integration_tests && go test -c
e2e_batch_stress: e2e_clean_slate
@testnet/testnet.test -test.run TestBatchStress -test.failfast -test.v || make -s fail
e2e_validator_out: e2e_clean_slate
@testnet/testnet.test -test.run TestValidatorOut -test.failfast -test.v || make -s fail
e2e_valset_stress: e2e_clean_slate
@testnet/testnet.test -test.run TestValsetStress -test.failfast -test.v || make -s fail
e2e_arbitrary_logic: e2e_clean_slate
@testnet/testnet.test -test.run TestArbitraryLogic -test.failfast -test.v || make -s fail
e2e_orchestrator_keys: e2e_clean_slate
@testnet/testnet.test -test.run TestOrchestratorKeys -test.failfast -test.v || make -s fail
fail:
@echo 'test failed; dumping container logs into ./testlogs for review'
@docker logs contract_deployer > testlogs/contract_deployer.log 2>&1 || true
@docker logs gravity0 > testlogs/gravity0.log 2>&1 || true
@docker logs gravity1 > testlogs/gravity1.log 2>&1 || true
@docker logs gravity2 > testlogs/gravity2.log 2>&1 || true
@docker logs gravity3 > testlogs/gravity3.log 2>&1 || true
@docker logs orchestrator0 > testlogs/orchestrator0.log 2>&1 || true
@docker logs orchestrator1 > testlogs/orchestrator1.log 2>&1 || true
@docker logs orchestrator2 > testlogs/orchestrator2.log 2>&1 || true
@docker logs orchestrator3 > testlogs/orchestrator3.log 2>&1 || true
@docker logs ethereum > testlogs/ethereum.log 2>&1 || true
@false
e2e_happy_path: e2e_clean_slate
integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestHappyPath || make -s fail
e2e_valset_update: e2e_clean_slate
integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValsetUpdate || make -s fail
e2e_validator_out: e2e_clean_slate
integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValidatorOut || make -s fail
e2e_transaction_stress: e2e_clean_slate
integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestTransactionStress || make -s fail
e2e_sandbox: e2e_clean_slate
integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestSandbox || make -s fail