-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathrun-multiple.sh
executable file
·42 lines (32 loc) · 1.12 KB
/
run-multiple.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/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, but the remaining testnets are still run.
#
# This is mostly used to run generated networks in nightly CI jobs.
#
set -euo pipefail
if [[ $# == 0 ]]; then
echo "Usage: $0 [MANIFEST...]" >&2
exit 1
fi
echo "🌊==> Running e2e tests:" "$@"
for MANIFEST in "$@"; do
START=$SECONDS
printf "\n\n\n\n🌊🌊🌊🌊🌊🌊🌊🌊\n\n\n\n\n"
echo "🌊==> Running manifest: $MANIFEST"
if ! e2e -f "$MANIFEST"; then
echo "🌊==> ❌ Testnet $MANIFEST failed, dumping manifest..."
cat "$MANIFEST"
echo "🌊==> Dumping failed container logs to failed-logs.txt..."
e2e -f "$MANIFEST" logs > failed-logs.txt
echo "🌊==> Cleaning up failed manifest $MANIFEST..."
e2e -f "$MANIFEST" clean
echo "🌊==> ❌ Manifest $MANIFEST failed..."
exit 1
fi
echo "🌊==> ✅ Completed manifest $MANIFEST in $(( SECONDS - START ))s"
done
echo "🌊==> 🎉 All manifests successful "