#!/bin/bash
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2017 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
cat /etc/hostname
cat /etc/hosts
+ARCHIVE_ARTIFACTS=(log.html output.xml report.html)
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+export PYTHONPATH=${SCRIPT_DIR}
+
export DEBIAN_FRONTEND=noninteractive
sudo apt-get -y update
sudo apt-get -y install libpython2.7-dev python-virtualenv
SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error"
-DPDK_VERSION=17.02
-DPDK_DIR=dpdk-${DPDK_VERSION}
-DPDK_PACKAGE=${DPDK_DIR}.tar.xz
+DPDK_VERSION=16.11.1
+DPDK_DIR=dpdk
+DPDK_PACKAGE=${DPDK_DIR}"-"${DPDK_VERSION}.tar.xz
function ssh_do() {
echo
fi
done
-# Temporarily download TLDK packages from nexus.fd.io
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-if [ "${#}" -ne "0" ]; then
- arr=(${@})
- echo ${arr[0]}
-else
- ## we need to download the TLDK and DPDK test files to this local host, maybe use scp or wget
- ## download DPDK source code from the fast.dpdk.org
- ## download TLDK source code from the gerrit.fd.io
- ## download some pcap file and .deb packages from the nexus.fd.io
- wget -q "fast.dpdk.org/rel/${DPDK_PACKAGE}"
- git clone https://gerrit.fd.io/r/tldk
- wget -q "https://nexus.fd.io/tldk/test_ipv4_assemble_rx.pcap" -P ./TLDK-tests/tldk_testconfig
- wget -q "https://nexus.fd.io/tldk/test_ipv4_checksum_rx.pcap" -P ./TLDK-tests/tldk_testconfig
- wget -q "https://nexus.fd.io/tldk/test_ipv4_fragment_rx.pcap" -P ./TLDK-tests/tldk_testconfig
- wget -q "https://nexus.fd.io/tldk/test_ipv6_checksum_rx.pcap" -P ./TLDK-tests/tldk_testconfig
- wget -q "https://nexus.fd.io/tldk/test_ipv6_fragment_rx.pcap" -P ./TLDK-tests/tldk_testconfig
-fi
#we will pack all the TLDK depend files and copy it to the VIRL_SERVER
VIRL_DIR_LOC="/tmp"
TLDK_TAR_FILE="tldk_depends.tar.gz"
-tar zcf ${TLDK_TAR_FILE} dpdk-17.02.tar.xz ./tldk/ \
- ./TLDK-tests/tldk_testconfig/ ./TLDK-tests/tldk_deplibs/
+wget "fast.dpdk.org/rel/${DPDK_PACKAGE}"
+
+tar zcf ${TLDK_TAR_FILE} ${DPDK_PACKAGE} ./tldk/ \
+ ./tests/tldk/tldk_testconfig/
cat ${VIRL_PKEY}
# Copy the files to VIRL host
echo "Starting simulation on VIRL server"
VIRL_TOPOLOGY=double-ring-nested.xenial
-VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6
+VIRL_RELEASE=csit-ubuntu-16.04.1_2017-07-26_1.9
function stop_virl_simulation {
ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${VIRL_SERVER}\
PYTHONPATH=`pwd` pybot -L TRACE -W 150 \
-v TOPOLOGY_PATH:${SCRIPT_DIR}/topologies/enabled/topology.yaml \
- --suite "TLDK-tests.func" \
+ --suite "tests.tldk.func" \
--include vm_envAND3_node_single_link_topo \
- --exclude PERFTEST \
- --exclude SKIP_PATCH \
--noncritical EXPECTED_FAILING \
- TLDK-tests/
+ tests/
+
+RETURN_STATUS=$(echo $?)
+
+# Archive artifacts
+mkdir archive
+for i in ${ARCHIVE_ARTIFACTS[@]}; do
+ cp $( readlink -f ${i} | tr '\n' ' ' ) archive/
+done
+
+exit ${RETURN_STATUS}