From 02c43fa6e40998c3126e221a3d5e26e882165877 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 21 Mar 2025 15:12:06 +0100 Subject: [PATCH] testing: Move removal of charon.pid into posttest section Fixes: a103f3a2849f ("testing: Add options to only run pre- or posttest scripts of a scenario") --- testing/do-tests | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/testing/do-tests b/testing/do-tests index 610e1a169..e2a60aa63 100755 --- a/testing/do-tests +++ b/testing/do-tests @@ -879,6 +879,16 @@ else $DIR/scripts/restore-defaults $testname + ########################################################################## + # remove any charon.pid files that still may exist + # + + for host in $IPSECHOSTS + do + eval HOSTLOGIN=root@\$ipv4_${host} + ssh $SSHCONF $HOSTLOGIN 'if [ -f /var/run/charon.pid ]; then rm /var/run/charon.pid; echo " removed charon.pid on `hostname`"; fi' + done + fi ############################################################################ @@ -928,17 +938,6 @@ fi @EOF - - ########################################################################## - # remove any charon.pid files that still may exist - # - - for host in $IPSECHOSTS - do - eval HOSTLOGIN=root@\$ipv4_${host} - ssh $SSHCONF $HOSTLOGIN 'if [ -f /var/run/charon.pid ]; then rm /var/run/charon.pid; echo " removed charon.pid on `hostname`"; fi' - done - ########################################################################## # exit if aborted or running only pre-/posttest scripts #