Commit a1f635f6 authored by Nicolas "Norswap" Laurent's avatar Nicolas "Norswap" Laurent Committed by norswap

add CI tests to Makefile

parent 24c78db4
...@@ -17,6 +17,44 @@ contracts: ...@@ -17,6 +17,44 @@ contracts:
yarn yarn
npx hardhat compile npx hardhat compile
define clear_cache
rm -rf /tmp/cannon
mkdir -p /tmp/cannon
endef
test_challenge:
$(call clear_cache)
# Build preimage cache for block 13284469
minigeth/go-ethereum 13284469
# Generate initial (generic) MIPS memory checkpoint and final checkpoint for
# block 13284469.
mipsevm/mipsevm && mipsevm/mipsevm 13284469
npx hardhat test test/challenge_test.js
test_mipsevm:
$(call clear_cache)
# Build preimage caches for the given blocks
minigeth/go-ethereum 13284469
minigeth/go-ethereum 13284491
cd mipsevm && go test -v
test_minigeth:
$(call clear_cache)
# Check that minigeth is able to validate the given transactions.
# run block 13284491 (0 tx)
minigeth/go-ethereum 13284491
# run block 13284469 (few tx)
minigeth/go-ethereum 13284469
# block 13284053 (deletion)
minigeth/go-ethereum 13284053
# run block 13303075 (uncles)
minigeth/go-ethereum 13303075
test_contracts:
npx hardhat test
test: test_challenge test_mipsevm test_minigeth
clean: clean:
rm minigeth/go-ethereum rm minigeth/go-ethereum
rm mipigo/minigeth rm mipigo/minigeth
...@@ -30,4 +68,4 @@ mrproper: clean ...@@ -30,4 +68,4 @@ mrproper: clean
rm -rf mipigo/venv rm -rf mipigo/venv
.PHONY: build unicorn minigeth_mips minigeth_default_arch mipsevm contracts \ .PHONY: build unicorn minigeth_mips minigeth_default_arch mipsevm contracts \
clean mrproper clean mrproper test_challenge test_mipsevm test_minigeth test
...@@ -37,6 +37,7 @@ contracts -- A Merkleized MIPS processor on chain + the challenge logic ...@@ -37,6 +37,7 @@ contracts -- A Merkleized MIPS processor on chain + the challenge logic
``` ```
make build make build
make test # verify everything works correctly
``` ```
## Usage ## Usage
......
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