From b577ba683afb5d31858b95bd0a9a9c479752c498 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Thu, 14 Apr 2016 23:46:39 +0300 Subject: regression: add --python2 and --python3 to run_regression, if nothing provided, use python2. hltapi: fix bug of not reducing 4 bytes from produced packets because of fcs. doc: add trex_client package stl/stf example of running examples :) --- scripts/run_regression | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) (limited to 'scripts/run_regression') diff --git a/scripts/run_regression b/scripts/run_regression index 02746bab..bdc2f185 100755 --- a/scripts/run_regression +++ b/scripts/run_regression @@ -1,6 +1,37 @@ #!/bin/bash -source find_python.sh --python2 -cd automation/regression -$PYTHON trex_unit_test.py --exclude functional $@ +INPUT_ARGS=${@//--python[23]/} + +if [[ $@ =~ '--python2' || ! $@ =~ '--python3' ]]; then + source find_python.sh --python2 + cd automation/regression + + # Python 2 + echo Python2 test + $PYTHON trex_unit_test.py $INPUT_ARGS + if [ $? -eq 0 ]; then + printf "\n$PYTHON test succeeded\n\n" + else + printf "\n*** $PYTHON test failed\n\n" + exit -1 + fi + cd - +fi + +if [[ $@ =~ '--python3' ]]; then + source find_python.sh --python3 + cd automation/regression + + # Python 3 + echo Python3 test + $PYTHON trex_unit_test.py $INPUT_ARGS + if [ $? -eq 0 ]; then + printf "\n$PYTHON test succeeded\n\n" + else + printf "\n*** $PYTHON test failed\n\n" + exit -1 + fi + cd - +fi + -- cgit 1.2.3-korg