tools: vpp download and installation script
[csit.git] / tests / suites / performance / short_ipv4.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13 *** Settings ***
14 | Resource | resources/libraries/robot/default.robot
15 | Resource | resources/libraries/robot/interfaces.robot
16 | Resource | resources/libraries/robot/ipv4.robot
17 | Resource | resources/libraries/robot/performance.robot
18 | Resource | resources/libraries/robot/counters.robot
19 | Library | resources.libraries.python.topology.Topology
20 | Library | resources.libraries.python.TrafficGenerator
21 | Library | resources.libraries.python.NodePath
22 | Library | resources.libraries.python.InterfaceUtil
23 | Library | resources.libraries.python.IPv4Setup.Dut | ${nodes['DUT1']} | WITH NAME | dut1_v4
24 | Library | resources.libraries.python.IPv4Setup.Dut | ${nodes['DUT2']} | WITH NAME | dut2_v4
25 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV
26 | Suite Setup | 3-node Performance Suite Setup
27 | Suite Teardown | 3-node Performance Suite Teardown
28 | Test Setup | Setup all DUTs before test
29 | Test Teardown  | Run Keyword If Test Failed | Show statistics on all DUTs
30
31 *** Test Cases ***
32 | 1core VPP passes 64B frames through IPv4 forwarding at 3.5mpps in 3-node topology
33 | | Given IPv4 forwarding initialized in a 3-node circular topology
34 | | Then Traffic should pass with no loss | 10 | 3.5mpps | 64 | 3-node-IPv4
35
36 | 1core VPP passes 1518B frames through IPv4 forwarding at 10gbps in 3-node topology
37 | | Given IPv4 forwarding initialized in a 3-node circular topology
38 | | Then Traffic should pass with no loss | 10 | 10gbps | 1518 | 3-node-IPv4
39
40 | 1core VPP passes 9000B frames through IPv4 forwarding at 10gbps in 3-node topology
41 | | Given IPv4 forwarding initialized in a 3-node circular topology
42 | | Then Traffic should pass with no loss | 10 | 10gbps | 9000 | 3-node-IPv4
43
44 *** Keywords ***
45
46 | 3-node Performance Suite Setup
47 | | 3-node circular Topology Variables Setup
48 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
49 | | ...                          | ${dut1} | ${dut1_if1} | ${dut1_if2}
50 | | ...                          | ${dut2} | ${dut2_if1} | ${dut2_if2}
51 | | ...                          | L3
52
53 | 3-node Performance Suite Teardown
54 | | Teardown traffic generator | ${tg}
55
56 | IPv4 forwarding initialized in a 3-node circular topology
57 | | Set Interface State | ${dut1} | ${dut1_if1} | up
58 | | Set Interface State | ${dut1} | ${dut1_if2} | up
59 | | Set Interface State | ${dut2} | ${dut2_if1} | up
60 | | Set Interface State | ${dut2} | ${dut2_if2} | up
61 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
62 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
63 | | ${dut1_if1_mac}= | Get Interface MAC | ${dut1} | ${dut1_if1}
64 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
65 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut1_if1}
66 | | ${dut2_if2_mac}= | Get Interface MAC | ${dut2} | ${dut1_if2}
67 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
68 | | dut1_v4.set_arp | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
69 | | dut2_v4.set_arp | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
70 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
71 | | dut1_v4.set_ip | ${dut1_if1} | 10.10.10.1 | 24
72 | | dut1_v4.set_ip | ${dut1_if2} | 1.1.1.1 | 30
73 | | dut2_v4.set_ip | ${dut2_if1} | 1.1.1.2 | 30
74 | | dut2_v4.set_ip | ${dut2_if2} | 20.20.20.1 | 24
75 | | dut1_v4.set_route | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
76 | | dut2_v4.set_route | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
77 | | All Vpp Interfaces Ready Wait | ${nodes}
78
79 | Traffic should pass with no loss
80 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
81 | | Send traffic on | ${nodes} | ${duration}
82 | | ...             | ${rate} | ${framesize} | ${topology_type}
83 | | No traffic loss occured
84
85 | Show statistics on all DUTs
86 | | Sleep | 10 | Waiting for statistics to be collected
87 | | Vpp show stats | ${dut1}
88 | | Vpp show stats | ${dut2}