aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap.sh13
-rw-r--r--resources/libraries/bash/dut_setup.sh33
-rw-r--r--resources/libraries/python/DUTSetup.py6
-rw-r--r--resources/libraries/python/ssh.py28
-rw-r--r--tests/suites/__init__.robot2
-rw-r--r--tests/suites/vxlan/vxlan_untagged.robot2
6 files changed, 56 insertions, 28 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index 37508668ff..efd5f34910 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -89,16 +89,15 @@ chmod 600 priv_key
rm -f *.deb
if [ "${#}" -ne "0" ]; then
- echo "let's use the parameters"
arr=(${@})
echo ${arr[0]}
else
- wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp/1.0.0-185~gca0f3b3_amd64/vpp-1.0.0-185~gca0f3b3_amd64.deb" || exit
- wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp-dbg/1.0.0-185~gca0f3b3_amd64/vpp-dbg-1.0.0-185~gca0f3b3_amd64.deb" || exit
- wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp-dev/1.0.0-185~gca0f3b3_amd64/vpp-dev-1.0.0-185~gca0f3b3_amd64.deb" || exit
- wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp-dpdk-dev/1.0.0-185~gca0f3b3_amd64/vpp-dpdk-dev-1.0.0-185~gca0f3b3_amd64.deb" || exit
- wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp-dpdk-dkms/1.0.0-185~gca0f3b3_amd64/vpp-dpdk-dkms-1.0.0-185~gca0f3b3_amd64.deb" || exit
- wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp-lib/1.0.0-185~gca0f3b3_amd64/vpp-lib-1.0.0-185~gca0f3b3_amd64.deb" || exit
+ wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp/1.0.0-229~gb1df169_amd64/vpp-1.0.0-229~gb1df169_amd64.deb" || exit
+ wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp-dbg/1.0.0-229~gb1df169_amd64/vpp-dbg-1.0.0-229~gb1df169_amd64.deb" || exit
+ wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp-dev/1.0.0-229~gb1df169_amd64/vpp-dev-1.0.0-229~gb1df169_amd64.deb" || exit
+ wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp-dpdk-dev/1.0.0-229~gb1df169_amd64/vpp-dpdk-dev-1.0.0-229~gb1df169_amd64.deb" || exit
+ wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp-dpdk-dkms/1.0.0-229~gb1df169_amd64/vpp-dpdk-dkms-1.0.0-229~gb1df169_amd64.deb" || exit
+ wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp-lib/1.0.0-229~gb1df169_amd64/vpp-lib-1.0.0-229~gb1df169_amd64.deb" || exit
fi
VPP_DEBS=(*.deb)
diff --git a/resources/libraries/bash/dut_setup.sh b/resources/libraries/bash/dut_setup.sh
index 077fdcc8c9..c6bd0fbbe2 100644
--- a/resources/libraries/bash/dut_setup.sh
+++ b/resources/libraries/bash/dut_setup.sh
@@ -13,32 +13,49 @@
# limitations under the License.
echo
-echo Restart VPP
+echo List vpp packages
echo
-sudo -S service vpp restart
+dpkg -l vpp\*
echo
-echo List vpp packages
+echo See vpp process
echo
-dpkg -l vpp\*
+ps aux | grep vpp
echo
-echo List /proc/meminfo
+echo See /etc/vpp/startup.conf
echo
-cat /proc/meminfo
+cat /etc/vpp/startup.conf
echo
-echo See vpp process
+echo Restart VPP
echo
-ps aux | grep vpp
+sudo -S service vpp restart
+
+echo
+echo List /proc/meminfo
+echo
+cat /proc/meminfo
echo
echo See free memory
echo
free -m
+echo
+echo See vpp process
+echo
+ps aux | grep vpp
+
echo UUID
sudo dmidecode | grep UUID
echo Add dpdk-input trace
sudo vpp_api_test <<< "exec trace add dpdk-input 100"
+RESULT=$?
+if [ $RESULT -ne 0 ]; then
+ echo
+ echo See /var/log/syslog
+ sudo tail -n 200 /var/log/syslog
+ exit $RESULT
+fi
diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py
index e5e56784d5..d5ebf9a069 100644
--- a/resources/libraries/python/DUTSetup.py
+++ b/resources/libraries/python/DUTSetup.py
@@ -10,15 +10,14 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+
from robot.api import logger
from topology import NodeType
from ssh import SSH
from constants import Constants
-class DUTSetup(object):
- def __init__(self):
- pass
+class DUTSetup(object):
def start_vpp_service_on_all_duts(self, nodes):
"""Start up the VPP service on all nodes."""
@@ -48,6 +47,7 @@ class DUTSetup(object):
ssh.exec_command('sudo -Sn bash {0}/{1}/dut_setup.sh'.format(
Constants.REMOTE_FW_DIR, Constants.RESOURCES_LIB_SH))
logger.trace(stdout)
+ logger.trace(stderr)
if 0 != int(ret_code):
logger.debug('DUT {0} setup script failed: "{1}"'.
format(node['host'], stdout + stderr))
diff --git a/resources/libraries/python/ssh.py b/resources/libraries/python/ssh.py
index a2bb9b1dc4..2de6f4a36e 100644
--- a/resources/libraries/python/ssh.py
+++ b/resources/libraries/python/ssh.py
@@ -18,6 +18,7 @@ from time import time
from robot.api import logger
from interruptingcow import timeout
from robot.utils.asserts import assert_equal, assert_not_equal
+from socket import timeout as socket_timeout
__all__ = ["exec_cmd", "exec_cmd_no_error"]
@@ -72,7 +73,7 @@ class SSH(object):
Returns (return_code, stdout, stderr).
"""
logger.trace('exec_command on {0}: {1}'
- .format(self._ssh.get_transport().getpeername(), cmd))
+ .format(self._ssh.get_transport().getpeername(), cmd))
start = time()
chan = self._ssh.get_transport().open_session()
if timeout is not None:
@@ -84,22 +85,33 @@ class SSH(object):
stdout = ""
while True:
- buf = chan.recv(self.__MAX_RECV_BUF)
- stdout += buf
- if not buf:
+ try:
+ buf = chan.recv(self.__MAX_RECV_BUF)
+ stdout += buf
+ if not buf:
+ break
+ except socket_timeout:
+ logger.trace('Channels stdout timeout occurred')
break
stderr = ""
while True:
- buf = chan.recv_stderr(self.__MAX_RECV_BUF)
- stderr += buf
- if not buf:
+ try:
+ buf = chan.recv_stderr(self.__MAX_RECV_BUF)
+ stderr += buf
+ if not buf:
+ break
+ except socket_timeout:
+ logger.trace('Channels stderr timeout occurred')
break
return_code = chan.recv_exit_status()
logger.trace('chan_recv/_stderr took {} seconds'.format(time()-end))
- return (return_code, stdout, stderr)
+ logger.trace('return RC {}'.format(return_code))
+ logger.trace('return STDOUT {}'.format(stdout))
+ logger.trace('return STDERR {}'.format(stderr))
+ return return_code, stdout, stderr
def exec_command_sudo(self, cmd, cmd_input=None, timeout=10):
"""Execute SSH command with sudo on a new channel on the connected Node.
diff --git a/tests/suites/__init__.robot b/tests/suites/__init__.robot
index 64f4a99de8..e025575dd7 100644
--- a/tests/suites/__init__.robot
+++ b/tests/suites/__init__.robot
@@ -16,6 +16,6 @@
| Library | resources/libraries/python/SetupFramework.py
| Library | resources.libraries.python.topology.Topology
| Suite Setup | Run Keywords | Setup Framework | ${nodes}
-| ... | AND | Start VPP Service On All DUTs | ${nodes}
+| ... | AND | Setup All DUTs | ${nodes}
| ... | AND | Update All Interface Data On All Nodes | ${nodes}
diff --git a/tests/suites/vxlan/vxlan_untagged.robot b/tests/suites/vxlan/vxlan_untagged.robot
index 0ec977052f..638c056e8d 100644
--- a/tests/suites/vxlan/vxlan_untagged.robot
+++ b/tests/suites/vxlan/vxlan_untagged.robot
@@ -16,7 +16,7 @@
| Resource | resources/libraries/robot/default.robot
| Resource | resources/libraries/robot/vxlan.robot
| Resource | resources/libraries/robot/l2_traffic.robot
-| Force Tags | 3_NODE_SINGLE_LINK_TOPO | EXPECTED_FAILING | VM_ENV | HW_ENV
+| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV
| Suite Setup | Run Keywords | Setup all DUTs before test
| ... | AND | Setup all TGs before traffic script
| ... | AND | Setup VXLAN tunnel on nodes | ${nodes['TG']}