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 | |
| 10 | *** Test Cases *** |
| 11 | |
| 12 | Check Network Latency |
| 13 | [Documentation] Check network connection between host MTR and BMC host. |
| 14 | [Tags] Check_Network_Latency |
| 15 | |
| 16 | Ping Host ${OPENBMC_HOST} |
| 17 | Repeat Keyword 3 times Log Network Loss |
| 18 | |
| 19 | *** Keywords *** |
| 20 | |
| 21 | Log Network Loss |
| 22 | [Documentation] Log Network packets loss percentage from MTR report. |
| 23 | ${report}= Get MTR Row ${OPENBMC_HOST} |
| 24 | Log To Console \n Network packets loss: ${report['loss']} percent |
| 25 | Sleep 3s |
| 26 | |
| 27 | Check If Tool Exist |
| 28 | [Documentation] Check if mtr tool exists. |
| 29 | |
| 30 | ${bin_path}= Run which mtr |
| 31 | Should Contain ${bin_path} mtr msg=mtr tool is not installed. |