blob: 71b57fe9e912741972c4dac3a271d50eaf6422c9 [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
George Keishing6fec3ab2017-05-05 10:45:08 -050056
57File Exist On OS
58 [Documentation] Check if the given file path exist on OS.
59 [Arguments] ${file_path}
60 # Description of argument(s):
61 # file_path Absolute file path.
62
63 Login To OS
64 ${out}= Execute Command On OS ls ${file_path}
65 Log To Console \n File Exist: ${out}
66
George Keishing8740a0c2017-05-13 07:19:16 -050067
68Is HTX Running
69 [Documentation] Check if the HTX exerciser is currently running.
70
71 ${status}= Execute Command On OS htxcmdline -status
72 Should Not Contain ${status} Daemon state is <IDLE>