From 709eda3b4ea0385da009932df3eba457e955e887 Mon Sep 17 00:00:00 2001 From: imarom Date: Wed, 23 Mar 2016 16:11:53 +0200 Subject: moving us to python 3 by default (console) --- scripts/run_functional_tests | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'scripts/run_functional_tests') 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 + -- cgit 1.2.3-korg