testing: Try to properly abort a test run after CTRL-C
The run is aborted after the current scenario. Depending on which command was interrupted it might be necessary to press CTRL-C multiple times (e.g. if a later command depends on the interrupted one). This should fix HTML files and get us some proper console output after the run.
This commit is contained in:
@@ -182,6 +182,16 @@ echo "strongSwan : $SWANVERSION"
|
||||
echo "Date : $TESTDATE"
|
||||
echo
|
||||
|
||||
##############################################################################
|
||||
# trap CTRL-C to properly terminate a long run
|
||||
#
|
||||
|
||||
function abort_tests()
|
||||
{
|
||||
echo -n "...aborting..." > /dev/tty
|
||||
aborted=YES
|
||||
}
|
||||
trap abort_tests INT
|
||||
|
||||
##############################################################################
|
||||
# enter specific test directory
|
||||
@@ -879,6 +889,11 @@ do
|
||||
ssh $SSHCONF $HOSTLOGIN 'if [ -f /var/run/charon.pid ]; then rm /var/run/charon.pid; echo " removed charon.pid on `hostname`"; fi'
|
||||
done
|
||||
|
||||
if [ -n "$aborted" ]
|
||||
then
|
||||
break 2
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user