From 2bcbca455b063e3ef6f90e85a1fac4994a0e6a51 Mon Sep 17 00:00:00 2001 From: imarom Date: Wed, 23 Mar 2016 11:55:07 +0200 Subject: python 3 - regression --- scripts/run_functional_tests | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'scripts/run_functional_tests') diff --git a/scripts/run_functional_tests b/scripts/run_functional_tests index e3a5fa61..783d6346 100755 --- a/scripts/run_functional_tests +++ b/scripts/run_functional_tests @@ -2,5 +2,29 @@ source find_python.sh cd automation/regression -$PYTHON trex_unit_test.py --functional $@ + +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 + +if [ -z "$PYTHON3" ]; then + echo "*** $PYTHON3 - python3 version required is 3.4 - skipping python3 test" +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 + +fi -- cgit