f164b0eeb5aaf4caf6b7e8ae7f5c50a35f32f3d5
[csit.git] / resources / libraries / robot / shared / suite_teardown.robot
1 # Copyright (c) 2020 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
14 """Keywords used in suite teardowns."""
15
16 *** Settings ***
17 | Library | resources.libraries.python.DPDK.DPDKTools
18 | Library | resources.libraries.python.TrafficGenerator
19 | Library | resources.libraries.python.DUTSetup
20 |
21 | Documentation | Suite teardown keywords.
22
23 *** Keywords ***
24 | Tear down suite
25 | | [Documentation]
26 | | ... | Common suite teardown for tests.
27 | |
28 | | ... | *Arguments:*
29 | | ... | - ${actions} - Additional teardown action. Type: list
30 | |
31 | | [Arguments] | @{actions}
32 | |
33 | | FOR | ${action} | IN | @{actions}
34 | | | Run Keyword | Additional Suite Tear Down Action For ${action}
35 | | END
36 | | Remove All Added VIF Ports On All DUTs From Topology | ${nodes}
37
38 | Additional Suite Tear Down Action For performance
39 | | [Documentation]
40 | | ... | Additional teardown for suites which uses performance measurement.
41 | |
42 | | Run Keyword And Ignore Error | Teardown traffic generator | ${tg}
43
44 | Additional Suite Tear Down Action For dpdk
45 | | [Documentation]
46 | | ... | Additional teardown for suites which uses dpdk.
47 | |
48 | | FOR | ${dut} | IN | @{duts}
49 | | | Cleanup DPDK Framework
50 | | | ... | ${nodes['${dut}']} | ${${dut}_${int}1}[0] | ${${dut}_${int}2}[0]
51 | | END
52
53 | Additional Suite Tear Down Action For hoststack
54 | | [Documentation]
55 | | ... | Additional teardown for suites which uses hoststack test programs.
56 | | ... | Ensure all hoststack test programs are no longer running on all DUTS.
57 | |
58 | | FOR | ${dut} | IN | @{duts}
59 | | | Kill Program | ${nodes['${dut}']} | iperf3
60 | | | Kill Program | ${nodes['${dut}']} | vpp_echo