Files
tendermint/test/e2e/run-multiple.sh
Erik Grinaker f9bfb40d53 test/e2e: add random testnet generator (#5479)
Closes #5291. Adds a randomized testnet generator. Nightly CI job will be submitted separately. A few of the testnets can be a bit flaky, even after disabling known-faulty behavior and making minor tweaks, and the larger networks may be too resource-intensive to run in CI - this will be optimized separately.
2020-10-22 13:36:08 +02:00

36 lines
864 B
Bash
Executable File

#!/usr/bin/env bash
#
# This is a convenience script that takes a list of testnet manifests
# as arguments and runs each one of them sequentially. If a testnet
# fails, the container logs are dumped to stdout along with the testnet
# manifest.
#
# This is mostly used to run generated networks in nightly CI jobs.
#
# Don't set -e, since we explicitly check status codes ourselves.
set -u
if [[ $# == 0 ]]; then
echo "Usage: $0 [MANIFEST...]" >&2
exit 1
fi
for MANIFEST in "$@"; do
START=$SECONDS
echo "==> Running testnet $MANIFEST..."
./build/runner -f "$MANIFEST"
if [[ $? -ne 0 ]]; then
echo "==> Testnet $MANIFEST failed, dumping manifest..."
cat "$MANIFEST"
echo "==> Dumping container logs for $MANIFEST..."
./build/runner -f "$MANIFEST" logs
exit 1
fi
echo "==> Completed testnet $MANIFEST in $(( SECONDS - START ))s"
echo ""
done