neutron/playbooks/legacy/neutron-functional-python27/run.yaml
Bernard Cafarelli 9359366d93 Switch default functional tests to python3, add job for python2
As a part of the python 3 community goal, this converts the functional
tests to run with python3 by default, and in Zuul.

As discussed at the Stein PTG in Denver, unit and functional tests will
still run on both versions, so this adds a python2 job for functional
tests.

This patch also suppress logging levels from some external libraries
to avoid issues with subunit.parser and python 3. For details see bug
reported for Cinder [1].

[1] https://bugs.launchpad.net/cinder/+bug/1728640

Co-Authored-By: Slawek Kaplonski <skaplons@redhat.com>

Change-Id: I8958d0b5b9147ffd1ef2d1cef5dcbf79c8be5cd4
2019-01-30 13:31:29 +00:00

55 lines
1.8 KiB
YAML

- hosts: all
name: Autoconverted job legacy-neutron-dsvm-functional from old job gate-neutron-dsvm-functional-ubuntu-xenial-nv
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -e
set -x
cat > clonemap.yaml << EOF
clonemap:
- name: openstack-infra/devstack-gate
dest: devstack-gate
EOF
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
git://git.openstack.org \
openstack-infra/devstack-gate
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=0
export DEVSTACK_GATE_EXERCISES=0
export DEVSTACK_GATE_NEUTRON=1
export DEVSTACK_GATE_INSTALL_TESTONLY=1
export BRANCH_OVERRIDE=default
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
fi
function gate_hook {
bash -xe $BASE/new/neutron/neutron/tests/contrib/gate_hook.sh dsvm-functional-python27
}
export -f gate_hook
function post_test_hook {
bash -xe $BASE/new/neutron/neutron/tests/contrib/post_test_hook.sh dsvm-functional-python27
}
export -f post_test_hook
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
./safe-devstack-vm-gate-wrap.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'