Run test cases at the end of provisioning
Change-Id: I63f2d5041b391ff052f8846a8793f51fb00fb6df
This commit is contained in:
parent
1758142b29
commit
a83149e39e
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@ -8,7 +8,7 @@ VAGRANTFILE_API_VERSION = "2"
|
||||
CPUS = 4
|
||||
|
||||
# Customize the amount of memory on the VM
|
||||
MEMORY = ENV.fetch("VM_SIZE", "4096").to_i
|
||||
MEMORY = ENV.fetch("VM_SIZE", "8192").to_i
|
||||
|
||||
# Every Vagrant development environment requires a box. You can search for
|
||||
# boxes at https://vagrantcloud.com/search.
|
||||
|
@ -3,10 +3,10 @@ TOBIKO_PLUGIN_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
|
||||
|
||||
function install_tobiko_deps {
|
||||
if [ "${TOBIKO_BINDEP}" != "" ]; then
|
||||
install_python3
|
||||
install_bindep "${TOBIKO_DIR}/bindep.txt" test
|
||||
fi
|
||||
install_python3
|
||||
git_clone "${TOBIKO_REPO}" "${TOBIKO_DIR}" "${TOBIKO_VERSION}"
|
||||
install_bindep "${TOBIKO_DIR}/bindep.txt" test
|
||||
pip_install 'tox>=3.8.0'
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,8 +13,6 @@ TOBIKO_CONF_FILE=${TOBIKO_CONF_FILE:-/etc/tobiko/tobiko.conf}
|
||||
TOBIKO_DEBUG=${TOBIKO_DEBUG:-True}
|
||||
TOBIKO_LOG_FILE=${TOBIKO_LOG_FILE:-${LOGDIR}/tobiko.log}
|
||||
|
||||
TOBIKO_BINDEP=${BINDEP_CMD:+-bindep}
|
||||
|
||||
# --- Glance settings ---
|
||||
TOBIKO_GLANCE_IMAGE_DIR=${TOBIKO_GLANCE_IMAGE_DIR:-}
|
||||
|
||||
|
@ -27,4 +27,4 @@ enable_plugin heat https://opendev.org/openstack/heat.git
|
||||
|
||||
# Configure Tobiko ------------------------------------------------------------
|
||||
|
||||
enable_plugin devstack-tobiko-plugin https://opendev.org/x/devstack-plugin-tobiko.git
|
||||
enable_plugin devstack-plugin-tobiko https://opendev.org/x/devstack-plugin-tobiko.git
|
||||
|
@ -21,4 +21,15 @@ devstack_dir: '{{ devstack_dest_dir }}/devstack'
|
||||
|
||||
sudo_secure_path: ''
|
||||
|
||||
tobiko_dir: '{{ devstack_dest_dir }}/tobiko'
|
||||
test_dir: '{{ devstack_dest_dir }}/tobiko'
|
||||
tox_envlist: ''
|
||||
tox_extra_args: ''
|
||||
tox_command_executable: 'tox'
|
||||
tox_command_line: >-
|
||||
{{ tox_command_executable }}
|
||||
{% if (tox_envlist | length) > 0 %}
|
||||
-e '{{ tox_envlist }}'
|
||||
{% endif %}
|
||||
{% if (tox_extra_args | length) > 0 %}
|
||||
{{ tox_extra_args }}
|
||||
{% endif %}
|
||||
|
@ -1,7 +1,18 @@
|
||||
---
|
||||
|
||||
- name: run tobiko test cases
|
||||
command:
|
||||
cmd: >
|
||||
tox -e {{ tox_envlist }}
|
||||
chdir: '{{ tobiko_dir }}'
|
||||
- name: 'Run test cases: {{ tox_command_line }}'
|
||||
become: true
|
||||
become_user: stack
|
||||
shell:
|
||||
cmd: |
|
||||
sudo su -l stack -c "cd '{{ test_dir }}' && {{ tox_command_line }}" 2>&1
|
||||
rc=$?
|
||||
echo "*** FINISHED ***"
|
||||
exit $rc
|
||||
register: run_tox
|
||||
ignore_errors: true
|
||||
|
||||
|
||||
- name: Show test cases output
|
||||
debug: var=run_tox.stdout_lines
|
||||
failed_when: run_tox is failed
|
||||
|
@ -15,9 +15,8 @@
|
||||
- openstack/heat
|
||||
- openstack/neutron
|
||||
- openstack/requirements
|
||||
- openstack/validations-libs
|
||||
- x/tobiko
|
||||
- x/devstack-plugin-tobiko
|
||||
- x/tobiko
|
||||
timeout: 7200
|
||||
vars:
|
||||
devstack_localrc:
|
||||
@ -42,7 +41,7 @@
|
||||
devstack_plugins:
|
||||
heat: https://opendev.org/openstack/heat.git
|
||||
neutron: https://opendev.org/openstack/neutron.git
|
||||
tobiko: https://opendev.org/x/devstack-plugin-tobiko.git
|
||||
devstack-plugin-tobiko: https://opendev.org/x/devstack-plugin-tobiko.git
|
||||
devstack_services:
|
||||
heat: true
|
||||
h-api: true
|
||||
|
Loading…
Reference in New Issue
Block a user