summaryrefslogtreecommitdiffstats
path: root/scripts/run_functional_tests
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-03-30 11:29:11 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-03-30 11:29:11 +0300
commitb91c216db1aa10ca7cc81b8c74b04ab79df251fe (patch)
treebd2184c2ea54c2e8d6554e082dd0b37e99a1e0e7 /scripts/run_functional_tests
parent935b711d82845514c30249b8cdd2e9ed6aa11526 (diff)
add to run_functional_tests --python2 and --python3 flags
make stateful tree similar to stl : stf/trex_stf_lib and stf/examples change trex_client package: add profiles, use full stl dir. stl examples: now use stl_path.STL_PROFILES_PATH variable regression: add higher timeout to rsync.
Diffstat (limited to 'scripts/run_functional_tests')
-rwxr-xr-xscripts/run_functional_tests48
1 files changed, 27 insertions, 21 deletions
diff --git a/scripts/run_functional_tests b/scripts/run_functional_tests
index 6212b40b..9ec1bd39 100755
--- a/scripts/run_functional_tests
+++ b/scripts/run_functional_tests
@@ -1,30 +1,36 @@
#!/bin/bash
-source find_python.sh --python2
-cd automation/regression
-# Python 2
-echo Python2 test
-$PYTHON trex_unit_test.py --functional $@
-if [ $? -eq 0 ]; then
- printf "\n$PYTHON test succeeded\n\n"
-else
- printf "\n*** $PYTHON test failed\n\n"
- exit -1
+if [[ $@ =~ '--python2' || ! $@ =~ '--python3' ]]; then
+ source find_python.sh --python2
+ cd automation/regression
+
+ # Python 2
+ echo Python2 test
+ $PYTHON trex_unit_test.py --functional $@
+ if [ $? -eq 0 ]; then
+ printf "\n$PYTHON test succeeded\n\n"
+ else
+ printf "\n*** $PYTHON test failed\n\n"
+ exit -1
+ fi
+ cd -
fi
-cd -
-source find_python.sh --python3
-cd -
+if [[ $@ =~ '--python3' || ! $@ =~ '--python2' ]]; then
+ source find_python.sh --python3
+ cd automation/regression
-# Python 3
-echo Python3 test
-$PYTHON trex_unit_test.py --functional $@
-if [ $? -eq 0 ]; then
- printf "\n$PYTHON test succeeded\n\n"
-else
- printf "\n*** $PYTHON test failed\n\n"
- exit -1
+ # Python 3
+ echo Python3 test
+ $PYTHON trex_unit_test.py --functional $@
+ if [ $? -eq 0 ]; then
+ printf "\n$PYTHON test succeeded\n\n"
+ else
+ printf "\n*** $PYTHON test failed\n\n"
+ exit -1
+ fi
+ cd -
fi