1b738eaeef2e99c2052cc96155e5103b15aac6dc
[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 | ...
19 | Documentation | Suite teardown keywords.
20
21 *** Keywords ***
22 | Tear down suite
23 | | [Documentation]
24 | | ... | Common suite teardown for tests.
25 | | ...
26 | | ... | *Arguments:*
27 | | ... | - ${actions} - Additional teardown action. Type: list
28 | | ...
29 | | [Arguments] | @{actions}
30 | | ...
31 | | :FOR | ${action} | IN | @{actions}
32 | | | Run Keyword | Additional Suite Tear Down Action For ${action}
33
34 | Additional Suite Tear Down Action For performance
35 | | [Documentation]
36 | | ... | Additional teardown for suites which uses performance measurement.
37 | | ...
38 | | Teardown traffic generator | ${tg}
39
40 | Additional Suite Tear Down Action For dpdk
41 | | [Documentation]
42 | | ... | Additional teardown for suites which uses dpdk.
43 | | ...
44 | | ${duts}= | Get Matches | ${nodes} | DUT*
45 | | :FOR | ${dut} | IN | @{duts}
46 | | | Cleanup DPDK Environment
47 | | | ... | ${nodes['${dut}']} | ${${dut}_if1} | ${${dut}_if2}