summaryrefslogtreecommitdiffstats
path: root/tests/data_plane/vpp_lite_topo/run.sh
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2016-08-16 23:37:40 +0200
committerFilip Tehlar <ftehlar@cisco.com>2016-08-23 11:56:02 +0200
commit4543d2821b1ab69579a525d83497ff84e9084bed (patch)
treead2d08bcbafb69042be12633a852fb800c07036e /tests/data_plane/vpp_lite_topo/run.sh
parent4cf0fc0cc463e294eab3f727d811e2a11ecadcae (diff)
Small improvements
- update function to check if odl is up - add global function (and option) to clean test sate - fix test driver script Change-Id: I80e4908d3a266ce064e5823f310f7a2302c10577 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'tests/data_plane/vpp_lite_topo/run.sh')
-rwxr-xr-xtests/data_plane/vpp_lite_topo/run.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/data_plane/vpp_lite_topo/run.sh b/tests/data_plane/vpp_lite_topo/run.sh
index aa0a298..d51b552 100755
--- a/tests/data_plane/vpp_lite_topo/run.sh
+++ b/tests/data_plane/vpp_lite_topo/run.sh
@@ -11,9 +11,10 @@ function help
echo
echo This must be run with superuser privileges.
echo "Usage:"
- echo " ./run.sh [vh]"
+ echo " ./run.sh [vhc]"
echo
echo " -v : verbose output"
+ echo " -c : clean"
echo " -h : show help"
}
@@ -28,6 +29,9 @@ while [ $# -gt 0 ] ; do
elif [ $arg == "-h" ] ; then
help
exit 0
+ elif [ $arg == "-c" ] ; then
+ clean_all
+ exit 0
fi
done
@@ -40,20 +44,16 @@ passed_num=0
start_time=`date +%s`
-# check whether ODL is running
-if [ "`curl -X DELETE \
- "http://${ODL_IP}:${ODL_PORT}/restconf/config/odl-mappingservice:mapping-database" \
- -u ${ODL_USER}:${ODL_PASSWD} -s -o /dev/null -w "%{http_code}"`" != 200 ] ; then
- echo "ODL is not running!"
- exit 1
-fi
-
# sudo?
if [[ $(id -u) != 0 ]]; then
echo "Superuser privileges needed!"
exit 1
fi
+# check whether ODL is running
+check_odl_running
+
+
# count tests
test_num=`ls -l "$TESTS_DIR"/test_* | wc -l`