1*** Settings *** 2Documentation Stress the system using HTX exerciser. 3 4Resource ../syslib/utils_os.robot 5 6Suite Setup Run Key Start SOL Console Logging 7Test Setup Pre Test Case Execution 8Test Teardown Post Test Case Execution 9 10*** Variables **** 11 12${stack_mode} skip 13 14*** Test Cases *** 15 16Hard Bootme Test 17 [Documentation] Stress the system using HTX exerciser. 18 [Tags] Hard_Bootme_Test 19 20 Rprintn 21 Rpvars HTX_DURATION HTX_INTERVAL 22 23 Repeat Keyword ${HTX_LOOP} times Start HTX Exerciser 24 25 26*** Keywords *** 27 28Start HTX Exerciser 29 [Documentation] Start HTX exerciser. 30 # Test Flow: 31 # - Power on 32 # - Establish SSH connection session 33 # - Create HTX mdt profile 34 # - Run HTX exerciser 35 # - Check HTX status for errors 36 # - Power off 37 38 Boot To OS 39 40 # Post Power off and on, the OS SSH session needs to be established. 41 Login To OS 42 43 Run Keyword If '${HTX_MDT_PROFILE}' == 'mdt.bu' 44 ... Create Default MDT Profile 45 46 Run MDT Profile 47 48 Loop HTX Health Check 49 50 Shutdown HTX Exerciser 51 52 Power Off Host 53 54 # Close all SSH and REST active sessions. 55 Close All Connections 56 Flush REST Sessions 57 58 Rprint Timen HTX Test ran for: ${HTX_DURATION} 59 60 61Loop HTX Health Check 62 [Documentation] Run until HTX exerciser fails. 63 64 Repeat Keyword ${HTX_DURATION} 65 ... Run Keywords Check HTX Run Status 66 ... AND Sleep ${HTX_INTERVAL} 67 68 69Post Test Case Execution 70 [Documentation] Do the post test teardown. 71 # 1. Shut down HTX exerciser if test Failed. 72 # 2. Capture FFDC on test failure. 73 # 3. Close all open SSH connections. 74 75 # Keep HTX running if user set HTX_KEEP_RUNNING to 1. 76 Run Keyword If '${TEST_STATUS}' == 'FAIL' and ${HTX_KEEP_RUNNING} == ${0} 77 ... Shutdown HTX Exerciser 78 79 ${keyword_buf}= Catenate Stop SOL Console Logging 80 ... \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log 81 Run Key ${keyword_buf} 82 83 FFDC On Test Case Fail 84 Close All Connections 85