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 |
| 5 | Suite Setup Power Off Host |
| 6 | Suite Teardown Shutdown HTX Exerciser |
| 7 | |
| 8 | *** Variables **** |
| 9 | |
| 10 | # Default duration and interval of HTX exerciser to run. |
| 11 | ${HTX_DURATION} 4 hours |
| 12 | ${HTX_INTERVAL} 15 min |
| 13 | |
| 14 | *** Test Cases *** |
| 15 | |
| 16 | Hard Bootme Test |
| 17 | [Documentation] Stress the system using HTX exerciser. |
| 18 | |
| 19 | Log To Console \n HTX Test run: ${HTX_DURATION} interval: ${HTX_INTERVAL} |
| 20 | Login To OS |
| 21 | |
| 22 | Log To Console \n *** Create HTX mdt profile *** |
| 23 | ${profile}= Execute Command On OS htxcmdline -createmdt |
| 24 | Log To Console \n ${profile} |
| 25 | Should Contain ${profile} mdts are created successfully |
| 26 | |
| 27 | Log To Console \n *** Start HTX mdt profile execution *** |
| 28 | ${htx_run}= Execute Command On OS htxcmdline -run -mdt mdt.bu |
| 29 | Log To Console \n ${htx_run} |
| 30 | Should Contain ${htx_run} Activated |
| 31 | |
| 32 | Loop HTX Health Check |
| 33 | |
| 34 | *** Keywords *** |
| 35 | |
| 36 | Loop HTX Health Check |
| 37 | [Documentation] Run until keyword fails. |
| 38 | Repeat Keyword ${HTX_DURATION} |
| 39 | ... Run Keywords Check HTX Run Status |
| 40 | ... AND Sleep ${HTX_INTERVAL} |
| 41 | |
| 42 | |
| 43 | Check HTX Run Status |
| 44 | [Documentation] Get HTX exerciser status and check for error. |
| 45 | |
| 46 | Log To Console \n *** Check HTX mdt Status and error *** |
| 47 | ${status}= Execute Command On OS htxcmdline -status -mdt mdt.bu |
| 48 | Log ${status} |
| 49 | |
| 50 | ${errlog}= Execute Command On OS htxcmdline -geterrlog |
| 51 | Log ${errlog} |
| 52 | |
| 53 | Should Contain ${errlog} file </tmp/htxerr> is empty |
| 54 | |
| 55 | |
| 56 | Shutdown HTX Exerciser |
| 57 | [Documentation] Shut down HTX exerciser run. |
| 58 | |
| 59 | Log To Console \n *** Shutdown HTX Run *** |
| 60 | ${shutdown}= Execute Command On OS htxcmdline -shutdown -mdt mdt.bu |
| 61 | Log To Console \n ${shutdown} |
| 62 | Should Contain ${shutdown} shutdown successfully |
| 63 | |
| 64 | # Power Off only if there is no error |
| 65 | Run Keyword If '${TEST_STATUS}' == 'FAIL' |
| 66 | ... Power Off Host |