SetupFramework to detect failures, part II
[csit.git] / tests / honeycomb / perf / __init__.robot
1 # Copyright (c) 2017 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 *** Variables***
15 # Honeycomb node to run tests on.
16 | ${node}= | ${nodes['DUT1']}
17
18 *** Settings ***
19 | Resource | resources/libraries/robot/shared/default.robot
20 | Resource | resources/libraries/robot/shared/interfaces.robot
21 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
22 | Resource | resources/libraries/robot/honeycomb/performance.robot
23 | Library | resources.libraries.python.SetupFramework
24 | Library | resources.libraries.python.SetupFramework.CleanupFramework
25 | Library | resources.libraries.python.CpuUtils
26 | Library | resources.libraries.python.honeycomb.Performance
27 | Suite Setup | Setup suite for Honeycomb performance tests
28 | Suite Teardown | Run Keywords
29 | ... | Stop VPP Service on DUT | ${node}
30 | ... | AND | Archive Honeycomb Logs | ${node} | perf=${True}
31 | ... | AND | Stop honeycomb service on DUTs | ${node}
32 | ... | AND | Cleanup Framework | ${nodes}
33
34 *** Keywords ***
35 | Setup suite for Honeycomb performance tests
36 | | [Documentation] | Setup variables and configure VPP and Honeycomb
37 | | ... | for performance testing.
38 | | ...
39 | | Set Global Variable | ${node}
40 | | Get CPU Layout from all nodes | ${nodes}
41 | | ${cores}= | Get Length | ${node['cpuinfo']}
42 | | Set Global Variable | ${cores}
43 | | Stop VPP Service on DUT | ${node}
44 | | Stop Honeycomb service on DUTs | ${node}
45 | | Generate VPP Startup Configuration for Honeycomb Test on DUT | ${node}
46 | | Configure Restconf binding address | ${node}
47 | | Configure Log Level | ${node} | INFO
48 | | Configure Persistence | ${node} | disable
49 | | Configure jVPP timeout | ${node} | ${14}
50 | | Generate Honeycomb startup configuration for performance test
51 | | ... | ${node} | ${cores}
52 | | Clear Persisted Honeycomb Configuration | ${node}
53
54 | Configure ODL Client for performance tests
55 | | [Documentation] | Setup ODL client for performance testing.
56 | | ...
57 | | ${use_odl_client}= | Get Variable Value | ${HC_ODL}
58 | | Run Keyword If | '${use_odl_client}' != '${NONE}'
59 | | ... | Run Keywords
60 | | ... | Set Global Variable | ${use_odl_client}
61 | | ... | AND | Copy ODL client | ${node} | ${HC_ODL} | ~ | ${install_dir}
62 | | ... | AND | Configure ODL Client Service On DUT | ${node} | ${install_dir}
63 | | ... | ELSE | Log | Variable HC_ODL is not present. Not using ODL.
64 | | ... | level=INFO