George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Stress the system using HTX exerciser. |
| 3 | |
| 4 | Resource ../syslib/utils_os.robot |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 5 | Library ../lib/gen_robot_print.py |
| 6 | |
| 7 | Test Setup Pre Test Case Execution |
| 8 | Test Teardown Post Test Case Execution |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 9 | |
| 10 | *** Variables **** |
| 11 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 12 | ${stack_mode} skip |
| 13 | |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 14 | # Default duration and interval of HTX exerciser to run. |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 15 | ${HTX_DURATION} 2 hours |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 16 | ${HTX_INTERVAL} 15 min |
| 17 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 18 | # Default hardbootme loop times HTX exerciser to run. |
| 19 | ${HTX_LOOP} 4 |
| 20 | |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 21 | *** Test Cases *** |
| 22 | |
| 23 | Hard Bootme Test |
| 24 | [Documentation] Stress the system using HTX exerciser. |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 25 | [Tags] Hard_Bootme_Test |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 26 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 27 | Rprintn |
| 28 | Rpvars HTX_DURATION HTX_INTERVAL |
| 29 | |
| 30 | Repeat Keyword ${HTX_LOOP} times Start HTX Exerciser |
| 31 | |
| 32 | |
| 33 | *** Keywords *** |
| 34 | |
| 35 | Start 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 Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 48 | Login To OS |
| 49 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 50 | Rprint Timen Create HTX mdt profile. |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 51 | ${profile}= Execute Command On OS htxcmdline -createmdt |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 52 | Rprint Timen ${profile} |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 53 | Should Contain ${profile} mdts are created successfully |
| 54 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 55 | Rprint Timen Start HTX mdt profile execution. |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 56 | ${htx_run}= Execute Command On OS htxcmdline -run -mdt mdt.bu |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 57 | Rprint Timen ${htx_run} |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 58 | Should Contain ${htx_run} Activated |
| 59 | |
| 60 | Loop HTX Health Check |
| 61 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 62 | Shutdown HTX Exerciser |
| 63 | |
| 64 | Power Off Host |
| 65 | |
| 66 | Rprint Timen HTX Test ran for: ${HTX_DURATION} |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 67 | |
| 68 | Loop HTX Health Check |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 69 | [Documentation] Run until HTX exerciser fails. |
| 70 | |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 71 | Repeat Keyword ${HTX_DURATION} |
| 72 | ... Run Keywords Check HTX Run Status |
| 73 | ... AND Sleep ${HTX_INTERVAL} |
| 74 | |
| 75 | |
| 76 | Check HTX Run Status |
| 77 | [Documentation] Get HTX exerciser status and check for error. |
| 78 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 79 | Rprint Timen Check HTX mdt Status and error. |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 80 | ${status}= Execute Command On OS htxcmdline -status -mdt mdt.bu |
| 81 | Log ${status} |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 82 | Rprint Timen ${status} |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 83 | |
| 84 | ${errlog}= Execute Command On OS htxcmdline -geterrlog |
| 85 | Log ${errlog} |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 86 | Rprint Timen ${errlog} |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 87 | |
| 88 | Should Contain ${errlog} file </tmp/htxerr> is empty |
| 89 | |
| 90 | |
| 91 | Shutdown HTX Exerciser |
| 92 | [Documentation] Shut down HTX exerciser run. |
| 93 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 94 | Rprint Timen Shutdown HTX Run |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 95 | ${shutdown}= Execute Command On OS htxcmdline -shutdown -mdt mdt.bu |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 96 | Rprint Timen ${shutdown} |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 97 | Should Contain ${shutdown} shutdown successfully |
| 98 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 99 | |
| 100 | Pre 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 | |
| 109 | Post 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 Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 115 | Run Keyword If '${TEST_STATUS}' == 'FAIL' |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 116 | ... Shutdown HTX Exerciser |
| 117 | |
| 118 | FFDC On Test Case Fail |
| 119 | Close All Connections |
| 120 | |