Files
pezkuwi-subxt/substrate/ci/check_for_exit.sh
T
Bastian Köcher 86b3f2e1a7 Augment every task spawned by Service with on_exit (#3581)
* Augment every task spawned by Service with `on_exit`

* Add CI test that the node exits
2019-09-10 12:05:54 +02:00

17 lines
318 B
Bash
Executable File

#!/usr/bin/env bash
# Script that checks that a node exits after `SIGINT` was send.
set -e
cargo build --release
./target/release/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