George Keishing | b3a3bde | 2017-01-24 10:38:59 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Network diagnostic tool report and logs to console |
| 3 | ... for information. For more information 'man mtr'. |
| 4 | |
| 5 | Library OperatingSystem |
| 6 | Library ../lib/utilities.py |
| 7 | Resource ../lib/utils.robot |
| 8 | Test Setup Check If Tool Exist |
| 9 | |
Sweta Potthuri | 5db43e4 | 2017-06-15 05:36:44 -0500 | [diff] [blame] | 10 | Force Tags Check_Network_Latency |
| 11 | |
George Keishing | b3a3bde | 2017-01-24 10:38:59 -0600 | [diff] [blame] | 12 | *** Test Cases *** |
| 13 | |
| 14 | Check Network Latency |
| 15 | [Documentation] Check network connection between host MTR and BMC host. |
| 16 | [Tags] Check_Network_Latency |
| 17 | |
| 18 | Ping Host ${OPENBMC_HOST} |
| 19 | Repeat Keyword 3 times Log Network Loss |
| 20 | |
| 21 | *** Keywords *** |
| 22 | |
| 23 | Log Network Loss |
| 24 | [Documentation] Log Network packets loss percentage from MTR report. |
| 25 | ${report}= Get MTR Row ${OPENBMC_HOST} |
| 26 | Log To Console \n Network packets loss: ${report['loss']} percent |
| 27 | Sleep 3s |
| 28 | |
| 29 | Check If Tool Exist |
| 30 | [Documentation] Check if mtr tool exists. |
| 31 | |
| 32 | ${bin_path}= Run which mtr |
| 33 | Should Contain ${bin_path} mtr msg=mtr tool is not installed. |