commit | c142c0903ced7c6795db4eb9c48c4ed96f60f955 | [log] [tgz] |
---|---|---|
author | Rahul Maheshwari <rahulmaheshwari@in.ibm.com> | Thu Jun 13 00:42:35 2019 -0500 |
committer | Rahul Maheshwari <rahulmaheshwari@in.ibm.com> | Thu Jun 13 00:43:35 2019 -0500 |
tree | 5fc32e28b5a05ba15a371c63ca2d568fc07d7ac7 | |
parent | e210d599e925fa279ce38e1345a683b5aa5ee20d [diff] |
Remove unwanted open curly bracket Change-Id: I19e95b1399eaf93e42ee2b601b4004cc3c57a7d2 Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
Interface Feature List
Key Feature List
Debugging Supported List
Miscellaneous Packages required to be installed for OpenBmc Automation. Install the packages and it's dependencies via pip
REST base packages:
$ pip install -U requests $ pip install -U robotframework-requests $ pip install -U robotframework-httplibrary
Python redfish library packages: For more detailed intstructions see python-redfish-library
$ pip install redfish
SSH and SCP base packages: For more detailed installation instructions see robotframework-sshlibrary
$ pip install robotframework-sshlibrary $ pip install robotframework-scplibrary
Installing tox:
$ pip install -U tox
If using Python 3.x, use the corresponding pip3
to install packages.
These documents contain details on developing OpenBMC test code and debugging.
To verify the installation setup is completed and ready to execute.
$ git clone https://github.com/openbmc/openbmc-test-automation $ cd openbmc-test-automation
$ robot -v OPENBMC_HOST:xx.xx.xx.xx templates/test_openbmc_setup.robotwhere xx.xx.xx.xx is the BMC hostname or IP.
There are several sub-directories within the openbmc-test-automation base which contain test suites, tools, templates, etc. These sub-directories are classified as follows:
tests/
: Contains the general test cases for OpenBMC stack functional verification. The "tests" subdirectory uses legacy REST and will be deprecated at some point and therefore no longer supported.
extended/
: Contains test cases for boot testing, code update testing, etc.
systest/
: Contains test cases for HTX bootme testing.
xcat/
: Contains test cases for XCAT automation.
gui/
: Contains test cases for web UI and security scanning tool automation.
network/
: Contains test cases for network testing. It covers IPv4 in static mode and in DHCP mode.
snmp/
: Contains test cases for SNMP (Simple Network Management Protocol) configuration testing.
remote_logging
: Contains test cases for remote logging via rsyslog.
openpower/ras/
: Contains test cases for RAS (Reliability, Availability and Serviceability) for an OpenPOWER system.
openpower/secureboot/
: Contains test cases for secure boot testing on a secure boot feature enabled OpenPOWER system only.
tools/
: Contains various tools.
templates/
: Contains sample code examples and setup testing.
test_list/
: Contains the argument files used for skipping test cases (e.g "skip_test", "skip_test_extended", etc.) or grouping them (e.g "HW_CI", "CT_basic_run", etc.).
OpenBMC is moving steadily towards DTMF Redfish, which is an open industry standard specification and schema that meets the expectations of end users for simple, modern and secure management of scalable platform hardware.
redfish
: Contains test cases for DMTF Redfish-related feature supported on OpenBMC.
To run openbmc-automation first you need to install the prerequisite Python packages which will help to invoke tests through tox (Note that tox version 2.3.1 or greater is required) or via Robot CLI command.
Robot Command Line
Execute all test suites for tests/
:
$ robot -v OPENBMC_HOST:xx.xx.xx.xx tests
Execute a test suite:
$ robot -v OPENBMC_HOST:xx.xx.xx.xx tests/test_basic_poweron.robot
Initialize the following environment variables which will be used during testing:
$ export OPENBMC_HOST=<openbmc machine ip address> $ export OPENBMC_PASSWORD=<openbmc password> $ export OPENBMC_USERNAME=<openbmc username> $ export OPENBMC_MODEL=[./data/Witherspoon.py, ./data/Palmetto.py, etc] $ export IPMI_COMMAND=<Dbus/External> $ export IPMI_PASSWORD=<External IPMI password>
For QEMU tests, set the following environment variables as well:
$ export SSH_PORT=<ssh port number> $ export HTTPS_PORT=<https port number>
Run tests:
$ tox -e tests
How to run individual test:
One specific test:
$ tox -e default -- --include Power_On_Test tests/test_basic_poweron.robot
No preset environment variables, default configuration for all supported systems:
$ OPENBMC_HOST=x.x.x.x tox -e default -- tests
No preset environment variables, one test case from a test suite:
$ OPENBMC_HOST=x.x.x.x tox -e default -- --include Power_On_Test tests/test_basic_poweron.robot
No preset environment variables, the entire test suite:
$ OPENBMC_HOST=x.x.x.x tox -e default -- tests
No preset environment variables, the entire test suite excluding test cases using argument file:
$ OPENBMC_HOST=x.x.x.x tox -e default -- --argumentfile test_lists/skip_test tests
Exclude test list for supported systems:
Palmetto: test_lists/skip_test_palmetto Witherspoon: test_lists/skip_test_witherspoon
Run IPMI tests:
Running only out-of-band IPMI tests:
$ robot -v IPMI_COMMAND:External -v OPENBMC_HOST:x.x.x.x --argumentfile test_lists/witherspoon/skip_inband_ipmi tests/ipmi/
Running only inband IPMI tests:
$ robot -v IPMI_COMMAND:Inband -v OPENBMC_HOST:x.x.x.x -v OS_HOST:x.x.x.x -v OS_USERNAME:xxxx -v OS_PASSWORD:xxxx --argumentfile test_lists/witherspoon/skip_oob_ipmi tests/ipmi/
Run GUI tests:
By default, GUI runs with Firefox browser and headless mode. Example with chrome browser and header mode:
$ robot -v OPENBMC_HOST:x.x.x.x -v GUI_BROWSER:gc -v GUI_MODE:header gui/obmc_gui/test/
Run GUI default CI test bucket:
$ robot -v OPENBMC_HOST:x.x.x.x --argumentfile test_lists/BMC_WEB_CI gui/obmc_gui/test/
Run LDAP tests:
Before using LDAP test functions, be sure appropriate LDAP user(s) and group(s) have been created on your LDAP server. Note: There are multiple ways to create LDAP users / groups and all depend on your LDAP server. One common way for openldap is ldapadd / ldapmodify refer https://linux.die.net/man/1/ldapadd For ldapsearch, refer to "https://linux.die.net/man/1/ldapsearch". Microsoft ADS: refer to https://searchwindowsserver.techtarget.com/definition/Microsoft-Active-Directory-Domain-Services-AD-DS
$ cd tests_ldap/ $ robot -v OPENBMC_HOST:x.x.x.x -v LDAP_SERVER_URI:<ldap(s)//LDAP Hostname / IP> -v LDAP_BIND_DN:<LDAP Bind DN> -v LDAP_BASE_DN:<LDAP Base DN> -v LDAP_BIND_DN_PASSWORD:<LDAP Bind password> -v LDAP_SEARCH_SCOPE:<LDAP search scope> -v LDAP_SERVER_TYPE:<LDAP server type> -v LDAP_USER:<LDAP user-id> -v LDAP_USER_PASSWORD:<LDAP PASSWORD> -v GROUP_NAME:<Group Name> -v GROUP_PRIVILEGE:<Privilege> test_user_ldap_management.robot
How to run CI and CT bucket test:
Default CI test bucket list:
$ OPENBMC_HOST=x.x.x.x tox -e default -- --argumentfile test_lists/HW_CI tests
Default CI smoke test bucket list:
$ OPENBMC_HOST=x.x.x.x tox -e default -- --argumentfile test_lists/CT_basic_run tests
Run extended tests:
For-loop test (default iteration is 10):
$ robot -v OPENBMC_HOST:x.x.x.x -v OPENBMC_SYSTEMMODEL:xxxxxx -v ITERATION:n -v LOOP_TEST_COMMAND:xxxxxx extended/full_suite_regression.robot
Example using tox testing a test suite for 5 iterations "witherspoon":
OPENBMC_HOST=x.x.x.x LOOP_TEST_COMMAND="tests/test_fw_version.robot" ITERATION=5 OPENBMC_SYSTEMMODEL=witherspoon tox -e witherspoon -- ./extended/full_suite_regression.robot
Jenkins jobs tox commands
$ OPENBMC_HOST=x.x.x.x tox -e default -- --argumentfile test_lists/HW_CI tests
Currently supported BMC and PNOR update formats are UBI and non-UBI. For code update information, please refer to code-update.md
UBI Format *
For BMC code update, download the system type *.ubi.mdt.tar image from https://openpower.xyz/job/openbmc-build/ and run as follows:
For Witherspoon system:
$ cd extended/code_update/ $ robot -v OPENBMC_HOST:x.x.x.x -v IMAGE_FILE_PATH:<image path>/obmc-phosphor-image-witherspoon.ubi.mtd.tar --include REST_BMC_Code_Update bmc_code_update.robot
For host code update, download the system type *.pnor.squashfs.tar image from https://openpower.xyz/job/openpower-op-build/ and run as follows:
For Witherspoon system:
$ cd extended/code_update/ $ robot -v OPENBMC_HOST:x.x.x.x -v IMAGE_FILE_PATH:<image path>/witherspoon.pnor.squashfs.tar --include REST_Host_Code_Update host_code_update.robot
Non-UBI Format *
For BMC code update, download the system type *all.tar image from https://openpower.xyz/job/openbmc-build/ and run as follows:
For a Zaius system:
$ cd extended/code_update/ $ robot -v OPENBMC_HOST:x.x.x.x -v FILE_PATH:<image path>/zaius-<date time>.all.tar --include Initiate_Code_Update_BMC update_bmc.robot
For host code update, download the system type *.pnor from https://openpower.xyz/job/openpower-op-build/ and run as follows:
For a Zaius system:
$ cd extended/ $ robot -v OPENBMC_HOST:x.x.x.x -v PNOR_IMAGE_PATH:<image path>/zaius.pnor test_bios_update.robot