Skip to content

Commit 057fd48

Browse files
authored
Merge pull request #71 from ethereum-optimism/tei/cleanup-op-program-test-data
Clean up op-program-test data
2 parents c06a13c + 3b702f6 commit 057fd48

File tree

10 files changed

+24
-257652
lines changed

10 files changed

+24
-257652
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
- name: Build op-program
103103
run: make -C rvsol/lib/optimism/op-program op-program-host && cp rvsol/lib/optimism/op-program/bin/op-program tests/op-program-test/
104104
- name: Run op-program
105-
run: tar -xzvf ./preimages.tar.gz && ./local_cmd.sh
105+
run: tar -xzvf ./test-data.tar.gz && ./local_cmd.sh
106106
working-directory: tests/op-program-test
107107

108108
rvgo-abigen:

tests/op-program-test/capture.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,20 @@ async def subscribe_logs():
9494
./asterisc run \\
9595
--info-at '%10000000' \\
9696
--proof-at never \\
97-
--input ./state.json \\
97+
--input ./test-data/state.json \\
98+
--meta ./test-data/meta.json \\
9899
-- \\
99100
./op-program \\
100-
--rollup.config ./chain-artifacts/rollup.json \\
101-
--l2.genesis ./chain-artifacts/genesis-l2.json \\
101+
--rollup.config ./test-data/chain-artifacts/rollup.json \\
102+
--l2.genesis ./test-data/chain-artifacts/genesis-l2.json \\
102103
--l1.trustrpc \\
103104
--l1.rpckind debug_geth \\
104105
--l1.head {logs[1]["l1BlockHash"]} \\
105106
--l2.head {l2_head} \\
106107
--l2.outputroot {logs[0]["outputRoot"]} \\
107108
--l2.claim {logs[1]["outputRoot"]} \\
108109
--l2.blocknumber {logs[1]["l2BlockNumber"]} \\
109-
--datadir ./preimages \\
110+
--datadir ./test-data/preimages \\
110111
--log.format terminal \\
111112
--server'''
112113

tests/op-program-test/capture.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ cp op-program/bin/op-program $script_dir/
2828
make devnet-up
2929

3030
# Copy devnet artifacts
31-
cp .devnet/rollup.json $script_dir/chain-artifacts/
32-
cp .devnet/genesis-l2.json $script_dir/chain-artifacts/
31+
mkdir -p $script_dir/test-data/chain-artifacts
32+
cp .devnet/rollup.json $script_dir/test-data/chain-artifacts/
33+
cp .devnet/genesis-l2.json $script_dir/test-data/chain-artifacts/
3334

3435
# Load op-program RISCV binary
3536
cd $script_dir
@@ -39,13 +40,15 @@ cd $script_dir
3940
$absolute_python_path capture.py
4041

4142
# Capture preimages
42-
rm -f ./preimages.tar.gz
43-
mkdir ./preimages
43+
rm -f ./test-data.tar.gz
44+
mkdir -p ./test-data/preimages
45+
mv state.json ./test-data/
46+
mv meta.json ./test-data/
4447
./capture_cmd.sh
45-
tar -czvf preimages.tar.gz ./preimages
48+
tar -czvf test-data.tar.gz ./test-data
4649

4750
# Clean up
48-
rm -r ./preimages ./capture_cmd.sh ./asterisc ./op-program ./op-program-client-riscv.elf ./out.json
51+
rm -r ./test-data ./capture_cmd.sh ./asterisc ./op-program ./op-program-client-riscv.elf ./out.json
4952

5053
# Write optimism version
5154
echo $git_commit_hash > VERSION

0 commit comments

Comments
 (0)