From 2776686019fa48e5abfc25d2799607daab0b7d08 Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Tue, 11 Oct 2016 10:30:10 +0200 Subject: Bug fix in odl-sfc testcase Test is stopping if the route to the VMs ip range is already there because the command that adds that, exits with code 1 and set -e is activated. Now it is checked if it is there and if not, the command is executed Change-Id: I820a55aff2572aadcb1950fa9218b114a9058c57 Signed-off-by: Manuel Buil (cherry picked from commit e2c2ff612e7086ce2a1520029f5f58e75186ec17) --- testcases/features/sfc/compute_presetup_CI.bash | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'testcases') diff --git a/testcases/features/sfc/compute_presetup_CI.bash b/testcases/features/sfc/compute_presetup_CI.bash index 57d3d8278..c776c2f8c 100755 --- a/testcases/features/sfc/compute_presetup_CI.bash +++ b/testcases/features/sfc/compute_presetup_CI.bash @@ -17,5 +17,10 @@ sshpass -p r00tme scp $ssh_options correct_classifier.bash ${INSTALLER_IP}:/root sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'scp correct_classifier.bash '"$ip"':/root' sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'ssh root@'"$ip"' ifconfig br-int up' +output=$(sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'ssh root@'"$ip"' ip route | \ +cut -d" " -f1 | grep 11.0.0.0' ; exit 0) + +if [ -z "$output" ]; then sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'ssh root@'"$ip"' ip route add 11.0.0.0/24 \ dev br-int' +fi -- cgit 1.2.3-korg