summaryrefslogtreecommitdiffstats
path: root/tests/functest/odl-sfc/prepare_odl_sfc.bash
diff options
context:
space:
mode:
authorGeorge Paraskevopoulos <geopar@intracom-telecom.com>2016-11-11 11:05:07 +0200
committerGeorge Paraskevopoulos <geopar@intracom-telecom.com>2016-11-15 10:19:47 +0200
commit45e3e5662af2997d633bd02a2eb0c7553f442e6e (patch)
treee938c410c58e0d43b37e4bd0d618df21c2245bed /tests/functest/odl-sfc/prepare_odl_sfc.bash
parent73c4d745bf2bba060dc8301a9127482f01318de1 (diff)
Copy odl-sfc test from functest to the sfc repo
Migrate odl-sfc testcase from functest repo First related functest commit: 65a5f65fa06c97456f37ca2434cf9e6fc9b758aa Last related functest commit: caa06d8d7b55a1c0608a72f809785d8f418cf541 Change-Id: I206f25d6fb44564b8b163ebb9c43e038851bea71 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
Diffstat (limited to 'tests/functest/odl-sfc/prepare_odl_sfc.bash')
-rwxr-xr-xtests/functest/odl-sfc/prepare_odl_sfc.bash38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/functest/odl-sfc/prepare_odl_sfc.bash b/tests/functest/odl-sfc/prepare_odl_sfc.bash
new file mode 100755
index 00000000..c4d8f4f8
--- /dev/null
+++ b/tests/functest/odl-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}/opnfv_tests/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