Convention over configuration
[validation.git] / tests / os / cyclictest / cyclictest.robot
1 ##############################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property.                             #
3 # Copyright (c) 2019 Nokia.                                                  #
4 #                                                                            #
5 # Licensed under the Apache License, Version 2.0 (the "License");            #
6 # you maynot use this file except in compliance with the License.            #
7 #                                                                            #
8 # You may obtain a copy of the License at                                    #
9 #       http://www.apache.org/licenses/LICENSE-2.0                           #
10 #                                                                            #
11 # Unless required by applicable law or agreed to in writing, software        #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
14 # See the License for the specific language governing permissions and        #
15 # limitations under the License.                                             #
16 ##############################################################################
17
18
19 *** Settings ***
20 Library           OperatingSystem
21 Library           BuiltIn
22 Library           SSHLibrary
23 Documentation     Cyclic latency test
24 Suite Setup       Open Connection And Log In
25 Suite Teardown    Close All Connections
26
27 *** Variables ***
28 ${LOG}             ${LOG_PATH}${/}${SUITE_NAME.replace(' ','_')}.log
29 ${SSH_KEYFILE}     /root/.ssh/id_rsa
30
31
32 *** Test Cases ***
33 Latency Test
34     ${output}  ${rc}=      Execute Command    cyclictest --mlockall --smp --priority=80 --interval=200 --distance=0 --duration=2    return_rc=True    sudo=True
35     Append To File         ${LOG}  ${output}${\n}
36     Should Be Equal As Integers  ${rc}  0
37
38
39 *** Keywords ***
40 Open Connection And Log In
41   Open Connection       ${HOST}
42   Login With Public Key    ${USERNAME}   ${SSH_KEYFILE}
43