integration of DMM+lwip testscripts
[csit.git] / tests / dmm / func / SingleCliSer-func.robot
1 # Copyright (c) 2018 Huawei Technologies Co.,Ltd.
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
14 *** Settings ***
15 | Library | resources.libraries.python.NodePath
16 | Library | resources.libraries.python.Trace
17 | Library | resources.libraries.python.TrafficScriptExecutor
18 | Library | resources.libraries.python.DMM.SingleCliSer
19 | Resource | resources/libraries/robot/shared/default.robot
20 | Resource | resources/libraries/robot/shared/interfaces.robot
21 | Resource | resources/libraries/robot/shared/counters.robot
22 | Resource | resources/libraries/robot/dmm/dmm_utils.robot
23 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | FUNCTEST | DMM
24 | Documentation | *DMM vs epoll test suite.*
25 | ...
26 | ... | Test suite uses 3-node topology TG - DUT1 - DUT2 - TG with single link
27 | ... | between nodes. From this topology only DUT1 and DUT2 nodes are used.
28 | ... | here we test the 1. test the vs_epool and vc_epoll
29
30 *** Variables ***
31 | ${ip4_net1_1}= | 172.28.128.3
32 | ${ip4_net2_1}= | 172.28.128.4
33 | ${ip4_prefix}= | 24
34
35 *** Test Cases ***
36 | TC01: DMM base vs epoll test case
37 | | Given DMM Basic Test Setup
38 | | When Exec the base vs epoll test | ${dut1_node} | ${dut2_node}
39 | | ... | ${dut1_to_dut2_if_name} | ${dut2_to_dut1_if_name}
40 | | ... | ${ip4_net1_1} | ${ip4_net2_1}
41 | | Echo DMM logs | ${dut2_node}
42 | | ${no_packet_loss} = | Get the test result | ${dut2_node}
43 | | Then Should Not Be Equal As Integers | ${no_packet_loss} | 0
44
45 | TC02: DMM LWIP integration test case
46 | | Given DMM Basic Test Setup
47 | | When Exec the base lwip test | ${dut1_node} | ${dut2_node}
48 | | ... | ${dut1_to_dut2_if_name} | ${dut2_to_dut1_if_name}
49 | | ... | ${ip4_net1_1} | ${ip4_net2_1}
50 | | Echo running log | ${dut1_node} | ${dut2_node}
51 | | Echo dpdk log | ${dut1_node} | ${dut2_node}
52 | | ${no_packet_loss_lwip} = | Get lwip test result | ${dut2_node}
53 | | Then Should Not Be Equal As Integers | ${no_packet_loss_lwip} | 0
54
55 *** Keywords ***
56 | DMM Basic Test Setup
57 | | Path for 2-node testing is set | ${nodes['DUT1']} | ${nodes['DUT2']}
58 | | Pick out the port used to execute test
59 | | Set DMM Interface Address | ${dut1_node} |
60 | | ... | ${dut1_to_dut2_if_name} | ${ip4_net1_1} | ${ip4_prefix}
61 | | Set DMM Interface Address | ${dut2_node}
62 | | ... | ${dut2_to_dut1_if_name} | ${ip4_net2_1} | ${ip4_prefix}