Update VPP version downloaded from Nexus. 70/470/24
authorMatej Klotton <mklotton@cisco.com>
Thu, 3 Mar 2016 16:49:13 +0000 (17:49 +0100)
committerGerrit Code Review <gerrit@fd.io>
Fri, 11 Mar 2016 12:22:05 +0000 (12:22 +0000)
Change-Id: Iae2ee6d576347262d9f3f9a9e9b9cc65dbc5bf5e
Signed-off-by: Matej Klotton <mklotton@cisco.com>
bootstrap.sh
resources/libraries/bash/dut_setup.sh
resources/libraries/python/DUTSetup.py
resources/libraries/python/ssh.py
tests/suites/__init__.robot
tests/suites/vxlan/vxlan_untagged.robot

index 3750866..efd5f34 100755 (executable)
@@ -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)
index 077fdcc..c6bd0fb 100644 (file)
 # 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
index e5e5678..d5ebf9a 100644 (file)
 # 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))
index a2bb9b1..2de6f4a 100644 (file)
@@ -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.
index 64f4a99..e025575 100644 (file)
@@ -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}
 
index 0ec9770..638c056 100644 (file)
@@ -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']}

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.