forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
77 lines (63 loc) · 2.45 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
# Generally, JUNIT_FILE is set in CI but may be specified to an arbitrary file location to emulate CI locally
ifdef JUNIT_FILE
go_test = OP_TESTLOG_DISABLE_COLOR=true OP_E2E_DISABLE_PARALLEL=false gotestsum --format=standard-verbose --junitfile=$(JUNIT_FILE) --
# Note: -parallel must be set to match the number of cores in the resource class
go_test_flags = -timeout=30m -parallel=8
else
go_test = go test
go_test_flags = -v
endif
# Not all the existing tests work in Espresso mode. We have selectively enabled some here. To enable
# more once they start working, simply add to the -run flag below.
espresso_test_flags = -l1-allocs ../.devnet-espresso/allocs-l1.json \
-l1-deployments ../.devnet-espresso/addresses.json \
-deploy-config ../packages/contracts-bedrock/deploy-config/devnetL1-espresso-template.json \
-parallel 1 \
-run "TestMissingGasLimit|TestGethOnlyPendingBlockIsLatest|TestInvalidDepositInFCU|TestRegolith|TestPreregolith|TestSystemE2E|TestConfirmationDepth|TestMintOnRevertedDeposit|TestSystemP2PAltSync|TestSystemRPCAltSync|TestWithdrawals|TestERC20BridgeDeposits" \
test: pre-test test-legacy-ws test-espresso-ws
.PHONY: test
test-external-%: pre-test
make -C ./external_$*/
$(go_test) $(go_test_flags) --externalL2 ./external_$*/
test-legacy-ws: pre-test
$(go_test) $(go_test_flags) ./...
.PHONY: test-legacy-ws
test-legacy-http: pre-test
OP_E2E_USE_HTTP=true $(go_test) $(go_test_flags) ./...
.PHONY: test-legacy-ws
test-espresso-ws: pre-test
$(go_test) $(go_test_flags) $(espresso_test_flags) ./...
.PHONY: test-espresso-ws
test-espresso-http: pre-test
OP_E2E_USE_HTTP=true $(go_test) $(go_test_flags) $(espresso_test_flags) ./...
.PHONY: test-espresso-ws
cannon-prestate:
make -C .. cannon-prestate
.PHONY: cannon-prestate
# We depend on the absolute pre-state generated by cannon to deploy the dispute game contracts.
devnet-allocs: pre-test-cannon
make -C .. devnet-allocs
.PHONY: devnet-allocs
devnet-allocs-espresso: pre-test-cannon
make -C .. devnet-allocs-espresso
.PHONY: devnet-allocs-espresso
pre-test: pre-test-cannon pre-test-allocs
.PHONY: pre-test
pre-test-cannon:
@if [ ! -e ../op-program/bin ]; then \
make cannon-prestate; \
fi
.PHONY: pre-test-cannon
pre-test-allocs:
@if [ ! -e ../.devnet ]; then \
make devnet-allocs; \
fi
@if [ ! -e ../.devnet-espresso ]; then \
make devnet-allocs-espresso; \
fi
.PHONY: pre-test-allocs
clean:
rm -r ../.devnet
rm -r ../.devnet-espresso
rm -r ../op-program/bin
.PHONY: clean