Commit 9daa786e authored by OptimismBot's avatar OptimismBot Committed by GitHub

Merge pull request #6644 from ethereum-optimism/jg/makefile_changes

Use make clean to clear op-e2e state
parents 4fa47249 08ca42bc
......@@ -822,11 +822,9 @@ jobs:
name: print go's available MIPS targets
command: go tool dist list | grep mips
- run:
name: generate cannon prestate
command: make cannon-prestate
- run:
name: generate L1 state
command: make devnet-allocs
name: Run all init steps for op-e2e
command: make pre-test
working_directory: <<parameters.module>>
- run:
name: run tests
command: |
......
devnet-allocs:
PYTHONPATH=../bedrock-devnet python3 ../bedrock-devnet/main.py --monorepo-dir=.. --allocs
test: pre-test
go test -v ./...
cannon-prestate:
make -C .. 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
pre-test: pre-test-cannon pre-test-allocs
pre-test:
$(shell ../ops/scripts/newer-file.sh ../.devnet/allocs-l1.json .././packages/contracts-bedrock)
if [ $(.SHELLSTATUS) -ne 0 ]; then \
pre-test-cannon:
@if [ ! -e ../op-program/bin ]; then \
make cannon-prestate; \
fi
pre-test-allocs:
@if [ ! -e ../.devnet ]; then \
make devnet-allocs; \
fi
test: pre-test
go test -v ./...
clean:
rm -r ../.devnet
rm -r ../op-program/bin
lint:
golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint -e "errors.As" -e "errors.Is"
......
......@@ -6,9 +6,17 @@
if [[ ! -e "$1" ]]; then exit 1; fi
if [[ ! -e "$2" ]]; then exit 1; fi
FILE_1_AGE=$(date +%s%N --reference "$1")
FILE_2_AGE=$(date +%s%N --reference "$2")
if (("$FILE_1_AGE" > "$FILE_2_AGE")); then
if uname | grep -q "Darwin"; then
MOD_TIME_FMT="-f %m"
else
MOD_TIME_FMT="-c %Y"
fi
FILE_1_AGE=$(stat $MOD_TIME_FMT "$1")
FILE_2_AGE=$(stat $MOD_TIME_FMT "$2")
if [ "$FILE_1_AGE" -gt "$FILE_2_AGE" ]; then
exit 0
fi
exit 1
exit 1
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment