Improve run.sh for better developer experience (#6945)
* run.sh: Create genesis file for ad-hoc validators * run.sh: Prefer release under NDEBUG * run.sh: Add sanity test for run.sh * run.sh: Conditionally re-gen drone and faucet keys * Make shellcheck happy * Address code review comments * Clean up a bit
This commit is contained in:
22
ci/run-sanity.sh
Executable file
22
ci/run-sanity.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
rm -f config/run/init-completed
|
||||
|
||||
timeout 15 ./run.sh &
|
||||
pid=$!
|
||||
|
||||
attempts=10
|
||||
while [[ ! -f config/run/init-completed ]]; do
|
||||
sleep 1
|
||||
if ((--attempts == 0)); then
|
||||
echo "Error: validator failed to boot"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"validatorExit"}' http://localhost:8899
|
||||
|
||||
wait $pid
|
@ -121,9 +121,11 @@ test-local-cluster)
|
||||
;;
|
||||
esac
|
||||
|
||||
echo --- ci/localnet-sanity.sh
|
||||
export CARGO_TOOLCHAIN=+"$rust_stable"
|
||||
(
|
||||
set -x
|
||||
export CARGO_TOOLCHAIN=+"$rust_stable"
|
||||
echo --- ci/localnet-sanity.sh
|
||||
ci/localnet-sanity.sh -x
|
||||
|
||||
echo --- ci/run-sanity.sh
|
||||
ci/run-sanity.sh -x
|
||||
)
|
||||
|
Reference in New Issue
Block a user