mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-20 14:16:22 +00:00
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.
This commit is contained in:
committed by
Erik Grinaker
parent
e7568f9e0c
commit
f9bfb40d53
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user