summaryrefslogtreecommitdiffstats
path: root/scripts/run_functional_tests
blob: 995b1b0de525db0af5492319c3cf225b063b35ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash

#source find_python.sh
cd automation/regression

PYTHON=/usr/bin/python2
PYTHON3=/auto/proj-pcube-b/apps/PL-b/tools/python3.4/bin/python3

# Python 2
$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

# 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