3 if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
7 # Make sure the disk image build fails if nfvbench installation fails
10 if [ $DIB_DEV_IMAGE != "generator" ]; then
16 mkdir /var/log/nfvbench
18 wget --no-cache --no-check-certificate https://trex-tgn.cisco.com/trex/release/$TREX_VER.tar.gz
19 tar xzf $TREX_VER.tar.gz -C /opt/trex
20 rm -f /$TREX_VER.tar.gz
21 rm -f /opt/trex/$TREX_VER/trex_client_$TREX_VER.tar.gz
22 cp -a /opt/trex/$TREX_VER/automation/trex_control_plane/interactive/trex /usr/local/lib/python3.6/site-packages/
23 rm -rf /opt/trex/$TREX_VER/automation/trex_control_plane/interactive/trex
25 # NFVbench installation
27 git clone https://gerrit.opnfv.org/gerrit/nfvbench
29 python3 -m pip install . --use-deprecated=legacy-resolver
30 cp xtesting/testcases.yaml /usr/local/lib/python3.6/site-packages/xtesting/ci/testcases.yaml
31 python3 ./docker/cleanup_generators.py
32 rm -rf /opt/nfvbench/.git
33 rm -rf /opt/nfvbench/nfvbench
34 # symlink to NFVbench sources
35 ln -s /usr/local/lib/python3.6/site-packages/nfvbench /opt/nfvbench/nfvbench
36 # persist env variables
37 echo "export TREX_VER=\"$TREX_VER\"" >> /etc/profile.d/nfvbench.sh
38 echo "export TREX_EXT_LIBS=\"/opt/trex/$TREX_VER/external_libs\"" >> /etc/profile.d/nfvbench.sh