Aura test update (master)#6115
Conversation
|
This test should use a temp data dir which should be cleared before the execution |
| #!/bin/bash | ||
| cargo build -j $(nproc) --release --features final $CARGOFLAGS | ||
| rm -rf parity-import-tests/ | ||
| cargo build -j $(nproc) --release --features final |
There was a problem hiding this comment.
no need for features final, this is not a public build
| rm -rf parity-import-tests/ | ||
| cargo build -j $(nproc) --release --features final | ||
| git clone https://github.com/paritytech/parity-import-tests | ||
| cp target/release/parity parity-import-tests/aura/parity |
There was a problem hiding this comment.
no need to copy the binary
| cargo build -j $(nproc) --release --features final $CARGOFLAGS | ||
| rm -rf parity-import-tests/ | ||
| cargo build -j $(nproc) --release | ||
| git clone https://github.com/paritytech/parity-import-tests |
There was a problem hiding this comment.
This should really be a submodule
| echo "Start Aura test" | ||
| parity import blocks.rlp --chain chain.json | ||
| parity restore snap --chain chain.json | ||
| target/release/parity import parity-import-tests/aura/blocks.rlp --chain parity-import-tests/aura/chain.json |
| echo "Import test failed" >&2 | ||
| exit 1 | ||
| fi | ||
| target/release/parity restore parity-import-tests/aura/snap --chain parity-import-tests/aura/chain.json |
| @@ -1,9 +1,23 @@ | |||
| #!/bin/bash | |||
| cargo build -j $(nproc) --release --features final $CARGOFLAGS | |||
| rm -rf parity-import-tests/ | |||
There was a problem hiding this comment.
Datadir must be cleared as well.
rm -rf /tmp/aura-test-data
|
In the future, there will be multiple tests in the We may also add tests for more features as they come up: those using WASM, those running PoS engines, etc. |
| git clone https://github.com/paritytech/parity-import-tests | ||
| cp target/release/parity parity-import-tests/aura/parity | ||
| cd parity-import-tests/aura | ||
| rm -rf parity-import-tests |
There was a problem hiding this comment.
This is not needed anymore
| echo "Start Aura test" | ||
| parity import blocks.rlp --chain chain.json | ||
| parity restore snap --chain chain.json | ||
| target/release/parity import test/parity-import-tests/aura/blocks.rlp --chain test/parity-import-tests/aura/chain.json -d /tmp/aura-test-data |
There was a problem hiding this comment.
@General-Beck there are now multiple import tests. Can you rewrite this as a loop to be future-proof?
There was a problem hiding this comment.
@rphmeier What condition can be taken for a loop?
There was a problem hiding this comment.
pseudocode like this
for test in parity-import-tests/*
cd parity-import-tests/$test
parity --chain chain.json -d /tmp/import-tests import blocks.rlp
parity --chain chain.json -d /tmp/import-tests restore snap
cd ../..
There was a problem hiding this comment.
each directory has 3 files:
- chain.json
- blocks.rlp
- snap
There was a problem hiding this comment.
@rphmeier Will there be a given amount of tests?
There was a problem hiding this comment.
no, there is no cap. we will add them periodically, whenever necessary.
|
@General-Beck anything happening here? |
|
this should be revived @paritytech/core-devs. IMO integration tests for varying chains are a pretty critical part of our test infrastructure. |
No description provided.