Validate ledger once all the tests complete

This commit is contained in:
Michael Vines
2018-08-07 09:29:58 -07:00
parent ceb5a76609
commit 1c38e40dee
2 changed files with 16 additions and 3 deletions

View File

@ -6,6 +6,7 @@
cd "$(dirname "$0")"/..
source ci/upload_ci_artifact.sh
source multinode-demo/common.sh
./multinode-demo/setup.sh
@ -21,10 +22,8 @@ for cmd in $backgroundCommands; do
echo "pid: $pid"
done
shutdown() {
exitcode=$?
killBackgroundCommands() {
set +e
echo --- Shutdown
for pid in "${pids[@]}"; do
if kill "$pid"; then
wait "$pid"
@ -32,7 +31,17 @@ shutdown() {
echo -e "^^^ +++\\nWarning: unable to kill $pid"
fi
done
set -e
pids=()
}
shutdown() {
exitcode=$?
killBackgroundCommands
set +e
echo "--- Upload artifacts"
for cmd in $backgroundCommands; do
declare logfile=log-$cmd.txt
upload_ci_artifact "$logfile"
@ -58,6 +67,9 @@ echo "--- Node count"
./multinode-demo/client.sh "$PWD" 3 -c --addr 127.0.0.1
)
echo "--- Ledger verification"
killBackgroundCommands
$solana_ledger_tool --ledger "$SOLANA_CONFIG_DIR"/ledger verify
echo +++
echo Ok