aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqun wan <qun.wan@intel.com>2017-06-14 20:44:42 -0400
committerPeter Mikus <pmikus@cisco.com>2017-06-16 08:20:04 +0000
commitb47b29bdbd8c10c8e5fcac6cc9abe72bea75df49 (patch)
tree6860df56e5c7bce95a7d5e416e38b6b62448ea34
parentf09f3019961acd8f4917d659dddd4d9bcade97f3 (diff)
Patches for the tldk functional test cases.
Change-Id: I0a70339edaff4c0e023c586ff84c8085ae6bc9c0 Signed-off-by: qun wan <qun.wan@intel.com>
-rwxr-xr-xTLDK-tests/tldk_scripts/install_tldk.sh25
-rwxr-xr-xTLDK-tests/tldk_scripts/run_tldk.sh2
-rwxr-xr-xbootstrap-TLDK.sh4
-rw-r--r--resources/libraries/python/TLDK/SetupTLDKTest.py2
4 files changed, 20 insertions, 13 deletions
diff --git a/TLDK-tests/tldk_scripts/install_tldk.sh b/TLDK-tests/tldk_scripts/install_tldk.sh
index 8941cfce4b..0cc65f949e 100755
--- a/TLDK-tests/tldk_scripts/install_tldk.sh
+++ b/TLDK-tests/tldk_scripts/install_tldk.sh
@@ -1,20 +1,23 @@
#!/bin/bash
-DPDK_VERSION=dpdk
+set -x
+
+DPDK_VERSION=16.11.1
ROOTDIR=/tmp/TLDK-testing
PWDDIR=$(pwd)
DPDK_DIR=dpdk
+DPDK_PACKAGE=${DPDK_DIR}"-"${DPDK_VERSION}.tar.xz
# compile and install the DPDK
cd ${ROOTDIR}
-tar xvf dpdk-16.11.1.tar.xz
-mv dpdk-stable-16.11.1 dpdk
+sudo tar xvf ${DPDK_PACKAGE}
+sudo mv dpdk-stable-${DPDK_VERSION} dpdk
echo $PWD
echo ${DPDK_PACKAGE}
cd ./${DPDK_DIR}
-sed -i 's/^CONFIG_RTE_LIBRTE_PMD_PCAP=n/CONFIG_RTE_LIBRTE_PMD_PCAP=y/g' ./config/common_base
-make install T=x86_64-native-linuxapp-gcc
+sudo sed -i 's/^CONFIG_RTE_LIBRTE_PMD_PCAP=n/CONFIG_RTE_LIBRTE_PMD_PCAP=y/g' ./config/common_base
+sudo make install T=x86_64-native-linuxapp-gcc
cd ${PWDDIR}
# compile the TLDK
@@ -24,11 +27,13 @@ cd ${ROOTDIR}/tldk
make all
cd ${PWDDIR}
-sudo killall -9 udpfwd 2>/dev/null
+sudo killall -9 l4fwd 2>/dev/null
+
+sleep 5
-pid=`pgrep udpfwd`
+pid=`pgrep l4fwd`
if [ "$pid" != "" ]; then
- echo "terminate the udpfwd failed!"
+ echo "terminate the l4fwd failed!"
exit 1
fi
@@ -43,8 +48,8 @@ if [ ${SYS_HUGEPAGE} -lt 1024 ]; then
MOUNT=$(mount | grep /mnt/huge)
done
- echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
- echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
+ echo 1024 | sudo tee /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
+ echo 1024 | sudo tee /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
sudo mkdir -p /mnt/huge
sudo mount -t hugetlbfs nodev /mnt/huge/
diff --git a/TLDK-tests/tldk_scripts/run_tldk.sh b/TLDK-tests/tldk_scripts/run_tldk.sh
index 747f5498a0..0f56f02dfc 100755
--- a/TLDK-tests/tldk_scripts/run_tldk.sh
+++ b/TLDK-tests/tldk_scripts/run_tldk.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+set -x
+
ROOTDIR=/tmp/TLDK-testing
PWDDIR=$(pwd)
diff --git a/bootstrap-TLDK.sh b/bootstrap-TLDK.sh
index 22fd78a7fb..48daf9be15 100755
--- a/bootstrap-TLDK.sh
+++ b/bootstrap-TLDK.sh
@@ -33,7 +33,7 @@ SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/
DPDK_VERSION=16.11.1
DPDK_DIR=dpdk
-DPDK_PACKAGE=${DPDK_DIR}.tar.xz
+DPDK_PACKAGE=${DPDK_DIR}"-"${DPDK_VERSION}.tar.xz
function ssh_do() {
echo
@@ -112,7 +112,7 @@ done
VIRL_DIR_LOC="/tmp"
TLDK_TAR_FILE="tldk_depends.tar.gz"
-tar zcf ${TLDK_TAR_FILE} dpdk-${DPDK_VERSION}.tar.xz ./tldk/ \
+tar zcf ${TLDK_TAR_FILE} ${DPDK_PACKAGE} ./tldk/ \
./TLDK-tests/tldk_testconfig/ ./TLDK-tests/tldk_deplibs/
cat ${VIRL_PKEY}
diff --git a/resources/libraries/python/TLDK/SetupTLDKTest.py b/resources/libraries/python/TLDK/SetupTLDKTest.py
index 3e3511c382..3d9685f198 100644
--- a/resources/libraries/python/TLDK/SetupTLDKTest.py
+++ b/resources/libraries/python/TLDK/SetupTLDKTest.py
@@ -129,7 +129,7 @@ def create_env_directory_at_node(node):
ssh.connect(node)
(ret_code, stdout, stderr) = ssh.exec_command(
'cd {0} && rm -rf env && '
- '. virtualenv --system-site-packages --never-download env && '
+ 'virtualenv --system-site-packages --never-download env && '
'. env/bin/activate && pip install -r requirements.txt'
.format(con.REMOTE_FW_DIR), timeout=100)
if ret_code != 0: