-*** Variables ***
-${default_devstack_prompt_timeout} 10s
-${DEVSTACK_SYSTEM_PASSWORD} \ # set to empty, but provide for others to override if desired
-${blacklist_file} /tmp/blacklist.txt
-@{stable/newton_exclusion_regexes} ${EMPTY}
-@{stable/ocata_exclusion_regexes} ${EMPTY}
-@{stable/pike_exclusion_regexes} ${EMPTY}
-@{master_exclusion_regexes} ${EMPTY}
-${tempest_dir} /opt/stack/tempest
-${tempest_config_file} ${tempest_dir}/etc/tempest.conf
-${external_physical_network} physnet1
-${external_net_name} external-net
-${external_subnet_name} external-subnet
-# Parameter values below are based on releng/builder - changing them requires updates in releng/builder as well
-${external_gateway} 10.10.10.250
-${external_subnet_allocation_pool} start=10.10.10.2,end=10.10.10.249
-${external_subnet} 10.10.10.0/24
-${TEMPEST_TIMEOUT} 420s
-${OS_CNTL_CONN_ID} None
-${OS_CMP1_CONN_ID} None
-${OS_CMP2_CONN_ID} None
-
-*** Keywords ***
-Run Tempest Tests
- [Arguments] ${tempest_regex} ${timeout}=${TEMPEST_TIMEOUT} ${debug}=False
- Run Keyword If "${debug}"=="False" Run Tempest Tests Without Debug ${tempest_regex} timeout=${timeout}
- Run Keyword If "${debug}"=="True" Run Tempest Tests With Debug ${tempest_regex} timeout=${timeout}
- Run Keyword If "${debug}"!="True" and "${debug}"!="False" Fail debug argument must be True or False
-
-Run Tempest Tests Without Debug
- [Arguments] ${tempest_regex} ${tempest_directory}=${tempest_dir} ${timeout}=${TEMPEST_TIMEOUT}
- [Documentation] Using ostestr will allow us to (by default) run tests in paralllel.
- ... Because of the parallel fashion, we must ensure there is no pause on teardown so that flag in tempest.conf is
- ... explicitly set to False.
- Return From Keyword If "skip_if_${OPENSTACK_BRANCH}" in @{TEST_TAGS}
- Return From Keyword If "skip_if_${SECURITY_GROUP_MODE}" in @{TEST_TAGS}
- ${tempest_conn_id}= SSHLibrary.Open Connection ${OS_CONTROL_NODE_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT}
- SSHKeywords.Flexible SSH Login ${OS_USER} ${DEVSTACK_SYSTEM_PASSWORD}
- Write Commands Until Prompt source ${DEVSTACK_DEPLOY_PATH}/openrc admin admin
- Write Commands Until Prompt cd ${tempest_directory}
- SSHLibrary.Read
- Tempest Conf Modify Pause On Test Teardown False
- SSHLibrary.Set Client Configuration timeout=${timeout}
- # There are tons of deprecation error messages when we use ostestr in our CSIT environment (openstack via devstack)
- # The robot log files are very large and one culprit is all these deprecation warnings. If we redirect stderr to
- # /dev/null we should be able to ignore them. We will miss any other errors, however.
- ${output}= Write Commands Until Prompt ostestr --regex ${tempest_regex} 2>/dev/null timeout=${timeout}
- Log ${output}
- SSHLibrary.Close Connection
- Should Contain ${output} Failed: 0
-
-Run Tempest Tests With Debug
- [Arguments] ${tempest_regex} ${tempest_directory}=${tempest_dir} ${timeout}=${TEMPEST_TIMEOUT}
- [Documentation] After setting pause_teardown=True in tempest.conf, use the python -m testtools.run module to execute
- ... a single tempest test case. We need to run only one tempest test case at a time as there will
- ... be potentional for an unkown number of debug pdb() prompts to catch and continue if we are running multiple
- ... test cases with a single command. Essentially, this keyword only handles one breakpoint at a single teardown.
- Return From Keyword If "skip_if_${OPENSTACK_BRANCH}" in @{TEST_TAGS}
- Return From Keyword If "skip_if_${SECURITY_GROUP_MODE}" in @{TEST_TAGS}
- ${tempest_conn_id}= SSHLibrary.Open Connection ${OS_CONTROL_NODE_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT}
- SSHKeywords.Flexible SSH Login ${OS_USER} ${DEVSTACK_SYSTEM_PASSWORD}
- Write Commands Until Prompt source ${DEVSTACK_DEPLOY_PATH}/openrc admin admin
- Write Commands Until Prompt cd ${tempest_directory}
- SSHLibrary.Read
- Tempest Conf Modify Pause On Test Teardown True
- SSHLibrary.Set Client Configuration timeout=${timeout}
- SSHLibrary.Write python -m testtools.run ${tempest_regex}
- ${output}= SSHLibrary.Read Until Regexp ${DEFAULT_LINUX_PROMPT_STRICT}|pdb.set_trace()
- Log ${output}
- Show Debugs
- Get Test Teardown Debugs
- SSHLibrary.Switch Connection ${tempest_conn_id}
- SSHLibrary.Write continue
- ${output}= SSHLibrary.Read Until Regexp ${DEFAULT_LINUX_PROMPT_STRICT}|pdb.set_trace()
- Log ${output}
- SSHLibrary.Write continue
- ${output}= SSHLibrary.Read Until Prompt
- Log ${output}
- SSHLibrary.Close Connection
- Should Contain ${output} OK
- Should Not Contain ${output} FAILED
-
-Suite Setup
- OpenStackOperations.OpenStack Suite Setup
- Log In To Tempest Executor And Setup Test Environment