5 if [ $(id -u) -ne 0 ]; then
10 # check python requirements
11 python3 ${DIR}/pkttest.py check_reqs
13 echo "Requirements for Python not met, exiting"
17 # secgw application parameters setup
18 CRYPTO_DEV="--vdev=crypto_null0"
19 SGW_PORT_CFG="--vdev=net_tap0,mac=fixed --vdev=net_tap1,mac=fixed"
20 SGW_EAL_XPRM="--no-pci"
23 . ${DIR}/common_defs_secgw.sh
25 echo "Running tests: $*"
28 # check test file presence
29 testfile="${DIR}/${testcase}.py"
30 if [ ! -f ${testfile} ]; then
31 echo "Invalid test ${testcase}"
36 python3 ${testfile} config > ${SGW_CFG_FILE}
39 echo "Cannot get secgw configuration for test ${testcase}"
43 # start the application
51 echo "Running test case: ${testcase}"
55 # stop the application
58 # report test result and exit on failure
59 if [ $st -eq 0 ]; then
60 echo "Test case ${testcase} succeeded"
62 echo "Test case ${testcase} failed!"