summaryrefslogtreecommitdiffstats
path: root/scripts/run_functional_tests
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-03-23 16:11:53 +0200
committerimarom <imarom@cisco.com>2016-03-23 16:11:53 +0200
commit709eda3b4ea0385da009932df3eba457e955e887 (patch)
tree6dc28821bdd3089be9cf837400fc12ff10f66992 /scripts/run_functional_tests
parente9ab260a5fa47604406e1e9432d0036dc8fd9928 (diff)
moving us to python 3 by default (console)
Diffstat (limited to 'scripts/run_functional_tests')
-rwxr-xr-xscripts/run_functional_tests39
1 files changed, 18 insertions, 21 deletions
diff --git a/scripts/run_functional_tests b/scripts/run_functional_tests
index 783d6346..995b1b0d 100755
--- a/scripts/run_functional_tests
+++ b/scripts/run_functional_tests
@@ -1,30 +1,27 @@
#!/bin/bash
-source find_python.sh
+#source find_python.sh
cd automation/regression
-if [ -z "$PYTHON" ]; then
- echo "*** $PYTHON - python version is too old, 2.7 at least is required"
-else
- $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
-fi
+PYTHON=/usr/bin/python2
+PYTHON3=/auto/proj-pcube-b/apps/PL-b/tools/python3.4/bin/python3
-if [ -z "$PYTHON3" ]; then
- echo "*** $PYTHON3 - python3 version required is 3.4 - skipping python3 test"
+# Python 2
+$PYTHON trex_unit_test.py --functional $@
+if [ $? -eq 0 ]; then
+ printf "\n$PYTHON test succeeded\n\n"
else
- $PYTHON3 trex_unit_test.py --functional $@
- if [ $? -eq 0 ]; then
- printf "\n$PYTHON3 test succeeded\n\n"
- else
- printf "\n*** $PYTHON3 test failed\n\n"
- exit -1
- fi
+ printf "\n*** $PYTHON test failed\n\n"
+ exit -1
+fi
+# Python 3
+$PYTHON3 trex_unit_test.py --functional $@
+if [ $? -eq 0 ]; then
+ printf "\n$PYTHON3 test succeeded\n\n"
+else
+ printf "\n*** $PYTHON3 test failed\n\n"
+ exit -1
fi
+