Files
pezkuwi-subxt/substrate/.maintain/check_for_exit.sh
T
Cecile Tonglet 506f9c29d9 Remove --release from check_for_exit.sh (#4775)
I don't see any good reason to build with --release to test this but this step takes 8-8:30 min on the CI and I suspect we would save some time by using the debug build instead.
2020-01-30 09:54:10 +01:00

17 lines
306 B
Bash
Executable File

#!/usr/bin/env bash
# Script that checks that a node exits after `SIGINT` was send.
set -e
cargo build
./target/debug/substrate --dev &
PID=$!
# Let the chain running for 60 seconds
sleep 60
# Send `SIGINT` and give the process 30 seconds to end
kill -INT $PID
timeout 30 tail --pid=$PID -f /dev/null