forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathjustfile
More file actions
77 lines (60 loc) · 1.99 KB
/
justfile
File metadata and controls
77 lines (60 loc) · 1.99 KB
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
import '../justfiles/default.just'
num_cores := num_cpus()
JUNIT_FILE := env('JUNIT_FILE', '')
JSON_LOG_FILE := env('JSON_LOG_FILE', '')
_go_test := if JUNIT_FILE != "" {
"OP_TESTLOG_DISABLE_COLOR=true OP_E2E_DISABLE_PARALLEL=false ../ops/scripts/gotestsum-split.sh --format=testname --junitfile=" + JUNIT_FILE + " --jsonfile=" + JSON_LOG_FILE + " -- -failfast"
} else {
"go test"
}
_go_test_flags := if JUNIT_FILE != "" {
"-timeout=60m -parallel=" + num_cores
} else {
"-v"
}
# Run all tests
test: pre-test test-ws
# Run tests for an external L2
test-external NAME: pre-test
#!/usr/bin/env bash
set -euo pipefail
make -C ./external_{{NAME}}/
{{_go_test}} {{_go_test_flags}} --externalL2 ./external_{{NAME}}/
# Run workspace tests
test-ws: pre-test
{{_go_test}} {{_go_test_flags}} ./system/... ./e2eutils/... ./opgeth/... ./interop/...
# Run action tests
test-actions: pre-test
{{_go_test}} {{_go_test_flags}} ./actions/...
# Run tests over HTTP
test-http: pre-test
OP_E2E_USE_HTTP=true {{_go_test}} {{_go_test_flags}} ./system/... ./e2eutils/... ./opgeth/... ./interop/...
# Run cannon tests
test-cannon: pre-test
OP_E2E_CANNON_ENABLED=true {{_go_test}} {{_go_test_flags}} ./faultproofs
# Run fault proof tests
test-fault-proofs: pre-test
{{_go_test}} {{_go_test_flags}} ./faultproofs
# Build cannon prestates
cannon-prestates:
cd .. && just cannon-prestates
# Pre-test setup
pre-test: pre-test-cannon
[private]
pre-test-cannon:
#!/usr/bin/env bash
set -euo pipefail
if [ ! -e ../op-program/bin ]; then
just cannon-prestates
fi
# Clean build artifacts
clean:
rm -rf ../.devnet
rm -rf ../op-program/bin
# Run fuzz tests
fuzz:
parallel --tag -N1 "go test -run NOTAREALTEST -tags cgo_test -v -fuzztime 10s -fuzz {} ./opgeth" ::: FuzzFjordCostFunction FuzzFastLzGethSolidity FuzzFastLzCgo
# Generate contract bindings
gen-binding CONTRACT:
cd ../packages/contracts-bedrock && just build
./scripts/gen-binding.sh {{CONTRACT}}