Python3: resources and libraries
[csit.git] / resources / libraries / robot / shared / suite_teardown.robot
1 # Copyright (c) 2019 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 |
20 | Documentation | Suite teardown keywords.
21
22 *** Keywords ***
23 | Tear down suite
24 | | [Documentation]
25 | | ... | Common suite teardown for tests.
26 | |
27 | | ... | *Arguments:*
28 | | ... | - ${actions} - Additional teardown action. Type: list
29 | |
30 | | [Arguments] | @{actions}
31 | |
32 | | FOR | ${action} | IN | @{actions}
33 | | | Run Keyword | Additional Suite Tear Down Action For ${action}
34 | | END
35 | | Remove All Added VIF Ports On All DUTs From Topology | ${nodes}
36
37 | Additional Suite Tear Down Action For performance
38 | | [Documentation]
39 | | ... | Additional teardown for suites which uses performance measurement.
40 | |
41 | | Teardown traffic generator | ${tg}
42
43 | Additional Suite Tear Down Action For dpdk
44 | | [Documentation]
45 | | ... | Additional teardown for suites which uses dpdk.
46 | |
47 | | FOR | ${dut} | IN | @{duts}
48 | | | Cleanup DPDK Environment
49 | | | ... | ${nodes['${dut}']} | ${${dut}_if1} | ${${dut}_if2}
50 | | END