forked from PeggyJV/steward
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (47 loc) · 2.66 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
.DEFAULT_GOAL := e2e_cork_test
VALIDATOR_IMAGE := "ghcr.io/peggyjv/sommelier-sommelier:main"
ORCHESTRATOR_IMAGE := "ghcr.io/peggyjv/gravity-bridge-orchestrator:latest"
build_protos:
./build_protos.sh
e2e_build_images: e2e_clean_slate
@docker pull $(VALIDATOR_IMAGE)
@docker tag $(VALIDATOR_IMAGE) sommelier:prebuilt
@docker pull $(ORCHESTRATOR_IMAGE)
@docker tag $(ORCHESTRATOR_IMAGE) orchestrator:prebuilt
@docker build -t steward:prebuilt -f Dockerfile .
@docker build -t ethereum:prebuilt -f integration_tests/ethereum/Dockerfile integration_tests/ethereum/
e2e_clean_slate:
@./clean_slate.sh
e2e_cork_test: e2e_aave_v2_stablecoin_test e2e_cellar_v1_test e2e_cellar_v2_test e2e_proposal_test
# Because of the way `make` works, using the e2e_clean_slate target twice as prerequisites
# for the individual tests doesn't work when `e2e_cork_test` runs the test targets in series,
# so we explicitly call the cleanup script in each test target.
e2e_aave_v2_stablecoin_test:
@./clean_slate.sh
@E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestAaveV2Stablecoin || make -s fail
e2e_cellar_v1_test:
@./clean_slate.sh
@E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestCellarV1 || make -s fail
e2e_cellar_v2_test:
@./clean_slate.sh
@E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestCellarV2 || make -s fail
e2e_proposal_test:
@./clean_slate.sh
@E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestScheduledCorkProposal || make -s fail
fail:
@echo 'test failed; dumping container logs into ./testdata for review'
@mkdir -p ./testdata
@docker logs ethereum > testdata/ethereum.log 2>&1 || true
@docker logs sommelier0 > testdata/sommelier0.log 2>&1 || true
@docker logs sommelier1 > testdata/sommelier1.log 2>&1 || true
@docker logs sommelier2 > testdata/sommelier2.log 2>&1 || true
@docker logs sommelier3 > testdata/sommelier3.log 2>&1 || true
@docker logs orchestrator0 > testdata/orchestrator0.log 2>&1 || true
@docker logs orchestrator1 > testdata/orchestrator1.log 2>&1 || true
@docker logs orchestrator2 > testdata/orchestrator2.log 2>&1 || true
@docker logs orchestrator3 > testdata/orchestrator3.log 2>&1 || true
@docker logs steward0 > testdata/steward0.log 2>&1 || true
@docker logs steward1 > testdata/steward1.log 2>&1 || true
@docker logs steward2 > testdata/steward2.log 2>&1 || true
@docker logs steward3 > testdata/steward3.log 2>&1 || true
@false