aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/features/sfc/prepare_odl_sfc.bash
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2016-09-06 17:47:20 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-06 17:47:20 +0000
commit3ad0c4bc46b80d6af267db792d8b0322cc581034 (patch)
tree4bcef9358bf71277dec48394962263bd4feaaefe /testcases/features/sfc/prepare_odl_sfc.bash
parent40411080fa108a8e1f00007c7e56ba4f827c8ead (diff)
parent30d7616a885a47dcc5c127b40d9b2df13d6aadb6 (diff)
Merge "Reduce logging in the SFC test case" into stable/colorado
Diffstat (limited to 'testcases/features/sfc/prepare_odl_sfc.bash')
-rwxr-xr-xtestcases/features/sfc/prepare_odl_sfc.bash38
1 files changed, 38 insertions, 0 deletions
diff --git a/testcases/features/sfc/prepare_odl_sfc.bash b/testcases/features/sfc/prepare_odl_sfc.bash
new file mode 100755
index 000000000..80ed9bd92
--- /dev/null
+++ b/testcases/features/sfc/prepare_odl_sfc.bash
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+#
+# Author: George Paraskevopoulos (geopar@intracom-telecom.com)
+# Manuel Buil (manuel.buil@ericsson.com)
+# Prepares the controller and the compute nodes for the odl-sfc testcase
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+
+ODL_SFC_LOG=/home/opnfv/functest/results/odl-sfc.log
+ODL_SFC_DIR=${FUNCTEST_REPO_DIR}/testcases/features/sfc
+
+# Split the output to the log file and redirect STDOUT and STDERR to /dev/null
+bash ${ODL_SFC_DIR}/server_presetup_CI.bash |& \
+ tee -a ${ODL_SFC_LOG} 1>/dev/null 2>&1
+
+# Get return value from PIPESTATUS array (bash specific feature)
+ret_val=${PIPESTATUS[0]}
+if [ $ret_val != 0 ]; then
+ echo "The tacker server deployment failed"
+ exit $ret_val
+fi
+echo "The tacker server was deployed successfully"
+
+bash ${ODL_SFC_DIR}/compute_presetup_CI.bash |& \
+ tee -a ${ODL_SFC_LOG} 1>/dev/null 2>&1
+
+ret_val=${PIPESTATUS[0]}
+if [ $ret_val != 0 ]; then
+ exit $ret_val
+fi
+
+exit 0