summaryrefslogtreecommitdiffstats
path: root/run_tests.sh
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2016-12-30 09:22:51 -0800
committerDeepak S <deepak.s@linux.intel.com>2017-01-19 08:28:32 +0530
commitc1d6fd53c49a2cc5c0a7eab82e15dcf1a08f4e32 (patch)
tree9a4b38b668a106130d7485750147a3df4cd3d035 /run_tests.sh
parentddb76faa5841997bd3eec4ed2f3d33f56e66d0c3 (diff)
Adding generic traffic profiles for trex traffic generator
This patch defines Generic traffic profiles - rfc2544, http etc JiRA: YARDSTICK-489 Change-Id:I0d8270b4d5f5f2d3415b98182990d8649099dbe3 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Diffstat (limited to 'run_tests.sh')
-rwxr-xr-xrun_tests.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 972f6a27f..b132a514a 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -33,7 +33,33 @@ run_flake8() {
fi
}
+get_external_libs() {
+ cd $(dirname ${BASH_SOURCE[0]})
+ TREX_DOWNLOAD="https://trex-tgn.cisco.com/trex/release/v2.05.tar.gz"
+ TREX_DIR=$PWD/trex/scripts
+ if [ ! -d "$TREX_DIR" ]; then
+ rm -rf ${TREX_DOWNLOAD##*/}
+ if [ ! -e ${TREX_DOWNLOAD##*/} ] ; then
+ wget $TREX_DOWNLOAD
+ fi
+ tar zxvf ${TREX_DOWNLOAD##*/}
+ pushd .
+ rm -rf trex && mkdir -p trex
+ mv v2.05 trex/scripts
+ rm -rf v2.05.tar.gz
+ touch "$PWD/trex/scripts/automation/trex_control_plane/stl/__init__.py"
+ popd
+ fi
+ echo "Done."
+ export PYTHONPATH=$PYTHONPATH:"$PWD/trex/scripts/automation/trex_control_plane"
+ export PYTHONPATH=$PYTHONPATH:"$PWD/trex/scripts/automation/trex_control_plane/stl"
+ echo $PYTHONPATH
+}
+
run_tests() {
+ echo "Get external libs needed for unit test"
+ get_external_libs
+
echo "Running unittest ... "
if [ $FILE_OPTION == "f" ]; then
python -m unittest discover -v -s tests/unit > $logfile 2>&1