blob: 6dae46920bf56a41f396456ac3e0f0bbc371dda4 [file] [log] [blame]
George Keishing0fff68a2017-04-27 22:25:49 -05001*** Settings ***
2Documentation Keywords for system related test. This is a subset of the
3... utils.robot. This resource file keywords is specifically
4... define for system test use cases.
5
George Keishing91c852f2017-05-03 02:48:21 -05006Library ../lib/gen_robot_keyword.py
7Resource ../extended/obmc_boot_test_resource.robot
George Keishing0fff68a2017-04-27 22:25:49 -05008Resource ../lib/utils.robot
George Keishing91c852f2017-05-03 02:48:21 -05009Resource ../lib/state_manager.robot
George Keishing0fff68a2017-04-27 22:25:49 -050010
11*** Variables ***
12
13*** Keywords ***
14
15Execute Command On OS
16 [Documentation] Execute given command on OS and return output.
17 [Arguments] ${command}
George Keishing91c852f2017-05-03 02:48:21 -050018 # Description of argument(s):
19 # command Shell command to be executed on OS.
George Keishing0fff68a2017-04-27 22:25:49 -050020 ${stdout} ${stderr}= Execute Command ${command} return_stderr=True
21 Should Be Empty ${stderr}
22 [Return] ${stdout}
23
24
25Login To OS
26 [Documentation] Login to OS Host.
27 [Arguments] ${os_host}=${OS_HOST} ${os_username}=${OS_USERNAME}
28 ... ${os_password}=${OS_PASSWORD}
George Keishing91c852f2017-05-03 02:48:21 -050029 # Description of argument(s):
30 # os_host IP address of the OS Host.
31 # os_username OS Host Login user name.
32 # os_password OS Host Login passwrd.
George Keishing0fff68a2017-04-27 22:25:49 -050033
George Keishing91c852f2017-05-03 02:48:21 -050034 Ping Host ${os_host}
George Keishing0fff68a2017-04-27 22:25:49 -050035 Open Connection ${os_host}
George Keishing91c852f2017-05-03 02:48:21 -050036 Login ${os_username} ${os_password}
37
38
39HTX Tool Exist
40 [Documentation] Check whether HTX exerciser is installed on OS.
41 Login To OS
42 ${output}= Execute Command On OS which htxcmdline
43 Should Contain ${output} htxcmdline
44 ... msg=Please install HTX exerciser.
45
46
47Boot To OS
48 [Documentation] Boot host OS.
49 Run Key OBMC Boot Test \ REST Power On
50
51
52Power Off Host
53 [Documentation] Power off host.
54 Run Key OBMC Boot Test \ REST Power Off
George Keishing0fff68a2017-04-27 22:25:49 -050055