1#openbmc-automation 2 3Quickstart 4---------- 5 6To run openbmc-automation first you need to install the prerequisite python 7packages which will help to invoke tests through tox. Note that tox 8version 2.3.1 or greater is required. 9 10Install the python dependencies for tox 11```shell 12 $ easy_install tox 13 $ easy_install pip 14``` 15 16Initilize the following environment variable which will used while testing 17```shell 18 $ export OPENBMC_HOST=<openbmc machine ip address> 19 $ export OPENBMC_PASSWORD=<openbmc username> 20 $ export OPENBMC_USERNAME=<openbmc password> 21 $ export OPENBMC_MODEL=[./data/Barreleye.py, ./data/Palmetto.py, etc] 22``` 23 24There are two different set of test suite existing based on the usage. 25The test suites are distinctly separated by directory as under 26 tests/ 27 extended/ 28 29`tests`: directory contains the general test cases 30 31`extended`: directory contains the use cases for new IP network testing,PDU, 32BIOS and BMC code update. 33 34```shell 35Use Following Variables for networking test cases 36=========================================================== 37 $export NEW_BMC_IP=<openbmc machine ip address> 38 $export NEW_SUBNET_MASK=<openbmc new subnet mask> 39 $export NEW_GATEWAY=<openbmc new gateway> 40========================================================== 41 42 Use following parameters for PDU: 43 $ export PDU_IP=<PDU IP address> 44 $ export PDU_USERNAME=<PDU username> 45 $ export PDU_PASSWORD=<PDU password> 46 $ export PDU_TYPE=<PDU type> 47 $ export PDU_SLOT_NO=<SLOT number> 48 49 for PDU_TYPE we support only synaccess at the moment 50 51Use following variables for syslog test cases 52========================================================== 53 $ export SYSLOG_IP_ADDRESS=<remote syslog system ip> 54 $ export SYSLOG_PORT=<remote syslog system port> 55 56Use the following variables for Qemu test run 57========================================================== 58 $ export SSH_PORT=<ssh port number> 59 $ export HTTPS_PORT=<https port number> 60 61Use the following variables for BIOS update testing 62========================================================== 63 $ export PNOR_IMAGE_PATH=<path to>/<machine>.pnor 64 65``` 66 67Run tests 68```shell 69 $ tox -e tests 70``` 71 72How to test individual test 73```shell 74 One specific test 75 $ tox -e custom -- -t '"DIMM0 no fault"' tests/test_sensors.robot 76 77 No preset environment variables, one test case from one test suite 78 $ OPENBMC_HOST=x.x.x.x tox -e barreleye -- -t '"DIMM0 no fault"' tests/test_sensors.robot 79 80 No preset environment variables, one test suite for a palmetto system 81 $ OPENBMC_HOST=x.x.x.x tox -e palmetto -- tests/test_sensors.robot 82 83 No preset environment variables, the entire test suite for a barreleye system 84 $ OPENBMC_HOST=x.x.x.x tox -e barreleye -- tests 85``` 86 87It can also be run by pasing variables from the cli... 88```shell 89 $ pybot -v OPENBMC_HOST:<ip> -v OPENBMC_USERNAME:root -v OPENBMC_PASSWORD:0penBmc -v OPENBMC_MODEL:<model path> 90``` 91 92Run extended tests 93```shell 94 Set the preset environment variables, run test suite for a barreleye system 95 $ OPENBMC_HOST=x.x.x.x tox -e barreleye -- extended/test_power_restore.robot 96 97 Similarly for Network, PDU and update BIOS 98 99 For BMC code update, download the system type *.all.tar image from https://openpower.xyz 100 and run as follows: 101 102 For Barreleye system 103 python -m robot -v OPENBMC_HOST:x.x.x.x -v FILE_PATH:downloaded_path/barreleye-xxxx.all.tar extended/code_update/update_bmc.robot 104``` 105