blob: 68968157c0614242161bce8afbd0df38a692691b [file] [log] [blame]
George Keishing8b082fd2017-05-03 13:42:39 -05001*** Settings ***
2Documentation Stress the system using HTX exerciser.
3
4Resource ../syslib/utils_os.robot
George Keishingffbe8ce2017-05-04 12:08:54 -05005Library ../lib/gen_robot_print.py
6
7Test Setup Pre Test Case Execution
8Test Teardown Post Test Case Execution
George Keishing8b082fd2017-05-03 13:42:39 -05009
10*** Variables ****
11
George Keishingffbe8ce2017-05-04 12:08:54 -050012${stack_mode} skip
13
George Keishing8b082fd2017-05-03 13:42:39 -050014# Default duration and interval of HTX exerciser to run.
George Keishingffbe8ce2017-05-04 12:08:54 -050015${HTX_DURATION} 2 hours
George Keishing8b082fd2017-05-03 13:42:39 -050016${HTX_INTERVAL} 15 min
17
George Keishingffbe8ce2017-05-04 12:08:54 -050018# Default hardbootme loop times HTX exerciser to run.
19${HTX_LOOP} 4
20
George Keishing8b082fd2017-05-03 13:42:39 -050021*** Test Cases ***
22
23Hard Bootme Test
24 [Documentation] Stress the system using HTX exerciser.
George Keishingffbe8ce2017-05-04 12:08:54 -050025 [Tags] Hard_Bootme_Test
George Keishing8b082fd2017-05-03 13:42:39 -050026
George Keishingffbe8ce2017-05-04 12:08:54 -050027 Rprintn
28 Rpvars HTX_DURATION HTX_INTERVAL
29
30 Repeat Keyword ${HTX_LOOP} times Start HTX Exerciser
31
32
33*** Keywords ***
34
35Start HTX Exerciser
36 [Documentation] Start HTX exerciser.
37 # Test Flow:
38 # - Power on
39 # - Establish SSH connection session
40 # - Create HTX mdt profile
41 # - Run HTX exerciser
42 # - Check HTX status for errors
43 # - Power off
44
45 Boot To OS
46
47 # Post Power off and on, the OS SSH session needs to be established.
George Keishing8b082fd2017-05-03 13:42:39 -050048 Login To OS
49
George Keishingffbe8ce2017-05-04 12:08:54 -050050 Rprint Timen Create HTX mdt profile.
George Keishing8b082fd2017-05-03 13:42:39 -050051 ${profile}= Execute Command On OS htxcmdline -createmdt
George Keishingffbe8ce2017-05-04 12:08:54 -050052 Rprint Timen ${profile}
George Keishing8b082fd2017-05-03 13:42:39 -050053 Should Contain ${profile} mdts are created successfully
54
George Keishingffbe8ce2017-05-04 12:08:54 -050055 Rprint Timen Start HTX mdt profile execution.
George Keishing8b082fd2017-05-03 13:42:39 -050056 ${htx_run}= Execute Command On OS htxcmdline -run -mdt mdt.bu
George Keishingffbe8ce2017-05-04 12:08:54 -050057 Rprint Timen ${htx_run}
George Keishing8b082fd2017-05-03 13:42:39 -050058 Should Contain ${htx_run} Activated
59
60 Loop HTX Health Check
61
George Keishingffbe8ce2017-05-04 12:08:54 -050062 Shutdown HTX Exerciser
63
64 Power Off Host
65
66 Rprint Timen HTX Test ran for: ${HTX_DURATION}
George Keishing8b082fd2017-05-03 13:42:39 -050067
68Loop HTX Health Check
George Keishingffbe8ce2017-05-04 12:08:54 -050069 [Documentation] Run until HTX exerciser fails.
70
George Keishing8b082fd2017-05-03 13:42:39 -050071 Repeat Keyword ${HTX_DURATION}
72 ... Run Keywords Check HTX Run Status
73 ... AND Sleep ${HTX_INTERVAL}
74
75
76Check HTX Run Status
77 [Documentation] Get HTX exerciser status and check for error.
78
George Keishingffbe8ce2017-05-04 12:08:54 -050079 Rprint Timen Check HTX mdt Status and error.
George Keishing8b082fd2017-05-03 13:42:39 -050080 ${status}= Execute Command On OS htxcmdline -status -mdt mdt.bu
81 Log ${status}
George Keishingffbe8ce2017-05-04 12:08:54 -050082 Rprint Timen ${status}
George Keishing8b082fd2017-05-03 13:42:39 -050083
84 ${errlog}= Execute Command On OS htxcmdline -geterrlog
85 Log ${errlog}
George Keishingffbe8ce2017-05-04 12:08:54 -050086 Rprint Timen ${errlog}
George Keishing8b082fd2017-05-03 13:42:39 -050087
88 Should Contain ${errlog} file </tmp/htxerr> is empty
89
90
91Shutdown HTX Exerciser
92 [Documentation] Shut down HTX exerciser run.
93
George Keishingffbe8ce2017-05-04 12:08:54 -050094 Rprint Timen Shutdown HTX Run
George Keishing8b082fd2017-05-03 13:42:39 -050095 ${shutdown}= Execute Command On OS htxcmdline -shutdown -mdt mdt.bu
George Keishingffbe8ce2017-05-04 12:08:54 -050096 Rprint Timen ${shutdown}
George Keishing8b082fd2017-05-03 13:42:39 -050097 Should Contain ${shutdown} shutdown successfully
98
George Keishingffbe8ce2017-05-04 12:08:54 -050099
100Pre Test Case Execution
101 [Documentation] Do the initial test setup.
102 # 1. Check if HTX tool exist.
103 # 2. Power on
104
105 Boot To OS
106 HTX Tool Exist
107
108
109Post Test Case Execution
110 [Documentation] Do the post test teardown.
111 # 1. Shut down HTX exerciser if test Failed.
112 # 2. Capture FFDC on test failure.
113 # 3. Close all open SSH connections.
114
George Keishing8b082fd2017-05-03 13:42:39 -0500115 Run Keyword If '${TEST_STATUS}' == 'FAIL'
George Keishingffbe8ce2017-05-04 12:08:54 -0500116 ... Shutdown HTX Exerciser
117
118 FFDC On Test Case Fail
119 Close All Connections
120