aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-05-06 15:29:52 +0000
committerPeter Mikus <pmikus@cisco.com>2019-05-09 11:34:01 +0000
commit2e250ffd8711be1247353d403a68573c0d232e8e (patch)
treee70ca7d576635d28ee0175227a5168a94ecbda18
parente0db487320596ce7fbdd29bd121969878297e12a (diff)
Remove old VPP Restart sequence
Change-Id: I7f71a9709ad55ce03d73e23cc8a9f5064947ed51 Signed-off-by: Peter Mikus <pmikus@cisco.com>
-rwxr-xr-xresources/libraries/bash/dut_setup.sh60
-rw-r--r--resources/libraries/python/DUTSetup.py34
-rw-r--r--resources/libraries/robot/ip/ip6.robot4
-rw-r--r--resources/libraries/robot/shared/default.robot13
-rw-r--r--tests/honeycomb/func/__init__.robot4
-rw-r--r--tests/nsh_sfc/func/__init__.robot8
-rw-r--r--tests/vpp/func/__init__.robot1
-rw-r--r--tests/vpp/func/ip4/eth2p-ethip4-ip4base-func.robot4
-rw-r--r--tests/vpp/perf/__init__.robot1
9 files changed, 24 insertions, 105 deletions
diff --git a/resources/libraries/bash/dut_setup.sh b/resources/libraries/bash/dut_setup.sh
deleted file mode 100755
index d0b2fabd8e..0000000000
--- a/resources/libraries/bash/dut_setup.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-# Copyright (c) 2018 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:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# 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.
-
-function cmd {
- echo "[Command_start_exec] '$1'"
- echo -n "[Command_outputs] "
- eval ${@}
- echo "[Command_done_exec] '$1'"
- echo
-}
-
-echo
-echo "[Command_desc] Starting ${0}"
-
-if [ -f "/etc/redhat-release" ]; then
- cmd 'rpm -qai *vpp*'
-else
- cmd 'dpkg -l | grep vpp'
-fi
-
-cmd 'ps aux | grep vpp'
-
-cmd 'cat /etc/vpp/startup.conf'
-
-cmd 'if fgrep docker /proc/1/cgroup; then supervisorctl restart vpp; else sudo -S service vpp restart; fi'
-
-echo "[Command_desc] SLEEP for three seconds, so that VPP is up for sure"
-cmd 'sleep 3'
-
-cmd "sudo journalctl --no-pager --unit=vpp --since=\"$(echo `systemctl show -p ActiveEnterTimestamp vpp` | awk '{print $2 $3}')\""
-
-cmd 'cat /proc/meminfo'
-
-cmd 'free -m'
-
-cmd 'ps aux | grep vpp'
-
-cmd 'sudo dmidecode | grep UUID'
-
-cmd 'lspci -Dnn'
-
-echo "[Command_desc] Adding dpdk-input trace"
-cmd 'sudo vpp_api_test <<< "exec trace add dpdk-input 50"'
-
-echo "[Command_desc] Adding vhost-user-input trace"
-cmd 'sudo vpp_api_test <<< "exec trace add vhost-user-input 50"'
-
-echo "[Command_desc] Adding memif-input trace"
-cmd 'sudo vpp_api_test <<< "exec trace add memif-input 50"'
diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py
index 7b75df94c8..bd6bb46a42 100644
--- a/resources/libraries/python/DUTSetup.py
+++ b/resources/libraries/python/DUTSetup.py
@@ -76,7 +76,8 @@ class DUTSetup(object):
message = 'Node {host} failed to restart service {name}'.\
format(host=node['host'], name=service)
- exec_cmd_no_error(node, command, timeout=30, sudo=True, message=message)
+ exec_cmd_no_error(
+ node, command, timeout=120, sudo=True, message=message)
DUTSetup.get_service_logs(node, service)
@@ -110,7 +111,8 @@ class DUTSetup(object):
message = 'Node {host} failed to start service {name}'.\
format(host=node['host'], name=service)
- exec_cmd_no_error(node, command, timeout=30, sudo=True, message=message)
+ exec_cmd_no_error(
+ node, command, timeout=120, sudo=True, message=message)
DUTSetup.get_service_logs(node, service)
@@ -161,34 +163,6 @@ class DUTSetup(object):
DUTSetup.stop_service(node, service)
@staticmethod
- def setup_dut(node):
- """Run script over SSH to setup the DUT node.
-
- :param node: DUT node to set up.
- :type node: dict
-
- :raises Exception: If the DUT setup fails.
- """
- command = 'bash {0}/{1}/dut_setup.sh'.\
- format(Constants.REMOTE_FW_DIR, Constants.RESOURCES_LIB_SH)
- message = 'DUT test setup script failed at node {name}'.\
- format(name=node['host'])
-
- exec_cmd_no_error(node, command, timeout=120, sudo=True,
- message=message)
-
- @staticmethod
- def setup_all_duts(nodes):
- """Run script over SSH to setup all DUT nodes.
-
- :param nodes: Topology nodes.
- :type nodes: dict
- """
- for node in nodes.values():
- if node['type'] == NodeType.DUT:
- DUTSetup.setup_dut(node)
-
- @staticmethod
def get_vpp_pid(node):
"""Get PID of running VPP process.
diff --git a/resources/libraries/robot/ip/ip6.robot b/resources/libraries/robot/ip/ip6.robot
index 73d486ed8f..a780144443 100644
--- a/resources/libraries/robot/ip/ip6.robot
+++ b/resources/libraries/robot/ip/ip6.robot
@@ -172,7 +172,9 @@
| Configure IPv6 on all DUTs in topology
| | [Documentation] | Setup IPv6 address on all DUTs
| | [Arguments] | ${nodes} | ${nodes_addr}
-| | Configure all DUTs before test
+| | Restart Vpp Service On All Duts | ${nodes}
+| | Verify Vpp On All Duts | ${nodes}
+| | VPP Enable Traces On All Duts | ${nodes}
| | ${interfaces}= | Nodes Set Ipv6 Addresses | ${nodes} | ${nodes_addr}
| | :FOR | ${interface} | IN | @{interfaces}
| | | Set Interface State | @{interface} | up | if_type=name
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index 09ca17d8a2..81ebc8300c 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -37,11 +37,6 @@
| Resource | resources/libraries/robot/vm/qemu.robot
*** Keywords ***
-| Configure all DUTs before test
-| | [Documentation] | Setup all DUTs in topology before test execution.
-| | ...
-| | Setup All DUTs | ${nodes}
-
| Configure all TGs for traffic script
| | [Documentation] | Prepare all TGs before traffic scripts execution.
| | ...
@@ -460,7 +455,9 @@
| Set up functional test
| | [Documentation] | Common test setup for functional tests.
| | ...
-| | Configure all DUTs before test
+| | Restart Vpp Service On All Duts | ${nodes}
+| | Verify Vpp On All Duts | ${nodes}
+| | VPP Enable Traces On All Duts | ${nodes}
| | Save VPP PIDs
| | Configure all TGs for traffic script
| | Update All Interface Data On All Nodes | ${nodes}
@@ -480,7 +477,9 @@
# much
| | [Documentation] | Common test setup for vpp-device tests.
| | ...
-| | Configure all DUTs before test
+| | Restart Vpp Service On All Duts | ${nodes}
+| | Verify Vpp On All Duts | ${nodes}
+| | VPP Enable Traces On All Duts | ${nodes}
| | Save VPP PIDs
| | Configure all TGs for traffic script
| | Update All Interface Data On All Nodes | ${nodes} | skip_tg_udev=${True}
diff --git a/tests/honeycomb/func/__init__.robot b/tests/honeycomb/func/__init__.robot
index 89c5dc90a2..8fc5f20aa9 100644
--- a/tests/honeycomb/func/__init__.robot
+++ b/tests/honeycomb/func/__init__.robot
@@ -25,7 +25,9 @@
| Resource | resources/libraries/robot/honeycomb/honeycomb.robot
| ...
| Suite Setup | Run Keywords | Setup Framework | ${nodes} | AND
-| ... | Setup All DUTs | ${nodes} | AND
+| ... | Restart Vpp Service On All Duts | ${nodes} | AND
+| ... | Verify Vpp On All Duts | ${nodes} | AND
+| ... | VPP Enable Traces On All Duts | ${nodes} | AND
| ... | Update All Interface Data On All Nodes | ${nodes} | AND
| ... | Configure all DUTs before test | AND
| ... | Set Global Variable | ${node} | AND
diff --git a/tests/nsh_sfc/func/__init__.robot b/tests/nsh_sfc/func/__init__.robot
index 707244ccb4..7f1391ca30 100644
--- a/tests/nsh_sfc/func/__init__.robot
+++ b/tests/nsh_sfc/func/__init__.robot
@@ -15,6 +15,8 @@
| Resource | resources/libraries/robot/shared/default.robot
| Resource | resources/libraries/robot/shared/interfaces.robot
| Library | resources.libraries.python.SFC.SetupSFCTest
-| Suite Setup | Run Keywords | Setup NSH SFC test | ${nodes}
-| ... | AND | Setup All DUTs | ${nodes}
-| ... | AND | Update All Interface Data On All Nodes | ${nodes}
+| Suite Setup | Run Keywords | Setup NSH SFC test | ${nodes} | AND
+| ... | Restart Vpp Service On All Duts | ${nodes} | AND
+| ... | Verify Vpp On All Duts | ${nodes} | AND
+| ... | VPP Enable Traces On All Duts | ${nodes} | AND
+| ... | Update All Interface Data On All Nodes | ${nodes}
diff --git a/tests/vpp/func/__init__.robot b/tests/vpp/func/__init__.robot
index 563d1ea363..c0060ab4a2 100644
--- a/tests/vpp/func/__init__.robot
+++ b/tests/vpp/func/__init__.robot
@@ -20,7 +20,6 @@
| ... | AND | Setup Framework | ${nodes}
| ... | AND | Install Vpp On All Duts | ${nodes} | ${VPP_PKG_DIR}
| ... | AND | Verify Vpp On All Duts | ${nodes}
-| ... | AND | Setup All DUTs | ${nodes}
| ... | AND | Update All Interface Data On All Nodes | ${nodes}
| Suite Teardown | Cleanup Framework | ${nodes}
diff --git a/tests/vpp/func/ip4/eth2p-ethip4-ip4base-func.robot b/tests/vpp/func/ip4/eth2p-ethip4-ip4base-func.robot
index 5262fa13e0..1b4f8cdb4a 100644
--- a/tests/vpp/func/ip4/eth2p-ethip4-ip4base-func.robot
+++ b/tests/vpp/func/ip4/eth2p-ethip4-ip4base-func.robot
@@ -19,7 +19,9 @@
| Resource | resources/libraries/robot/ip/ip4.robot
| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | SKIP_VPP_PATCH
| Suite Setup | Run Keywords
-| ... | Configure all DUTs before test | AND
+| ... | Restart Vpp Service On All Duts | ${nodes} | AND
+| ... | Verify Vpp On All Duts | ${nodes} | AND
+| ... | VPP Enable Traces On All Duts | ${nodes} | AND
| ... | Configure all TGs for traffic script | AND
| ... | Update All Interface Data On All Nodes | ${nodes} | AND
| ... | Configure DUT nodes for IPv4 testing
diff --git a/tests/vpp/perf/__init__.robot b/tests/vpp/perf/__init__.robot
index 37ff3a8192..25ed403d8a 100644
--- a/tests/vpp/perf/__init__.robot
+++ b/tests/vpp/perf/__init__.robot
@@ -24,7 +24,6 @@
| ... | AND | Install Vpp on All Duts | ${nodes} | ${packages_dir}
| ... | AND | Verify Vpp on All Duts | ${nodes}
| ... | AND | Verify UIO Driver on all DUTs | ${nodes}
-| ... | AND | Setup All DUTs | ${nodes}
| ... | AND | Show Vpp Version on All Duts | ${nodes}
| ... | AND | Get CPU Layout from All nodes | ${nodes}
| ... | AND | Update All Interface Data on All Nodes | ${nodes}