From cc42aec19c9cf9b448358cef51a03a71fa1c5234 Mon Sep 17 00:00:00 2001 From: Maru Newby Date: Wed, 15 Jan 2014 22:16:47 +0000 Subject: [PATCH] Add an experimental functional job for neutron. It is often desirable to test Neutron's interaction with the underling OS and without involving Tempest. Unit tests do not allow sudo invocations and are not guaranteed to run in an environment configured with the necessary dependencies. This change adds a new sudo-capable functional job that executes after devstack has configured the host. Change-Id: I89058bf0e7f4d008c7f3403109a744f524db50c3 --- .../config/neutron-functional.yaml | 37 +++++++++++++++++++ .../jenkins_job_builder/config/projects.yaml | 5 +++ .../openstack_project/files/zuul/layout.yaml | 1 + 3 files changed, 43 insertions(+) create mode 100644 modules/openstack_project/files/jenkins_job_builder/config/neutron-functional.yaml diff --git a/modules/openstack_project/files/jenkins_job_builder/config/neutron-functional.yaml b/modules/openstack_project/files/jenkins_job_builder/config/neutron-functional.yaml new file mode 100644 index 0000000000..cd9fc0dcf5 --- /dev/null +++ b/modules/openstack_project/files/jenkins_job_builder/config/neutron-functional.yaml @@ -0,0 +1,37 @@ +- job-template: + name: '{pipeline}-neutron-dsvm-functional{branch-designator}' + node: '{node}' + + wrappers: + - timeout: + timeout: 125 + fail: true + - timestamps + + builders: + - devstack-checkout + - shell: | + #!/bin/bash -xe + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_TIMEOUT=120 + export DEVSTACK_GATE_TEMPEST=0 + export DEVSTACK_GATE_EXERCISES=0 + export BRANCH_OVERRIDE={branch-override} + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + + function post_test_hook {{ + /opt/stack/new/devstack/unstack.sh + export OS_SUDO_TESTING=1 + cd /opt/stack/new/neutron + tox -e functional + }} + 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 + - link-logs + + publishers: + - devstack-logs + - console-log diff --git a/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml b/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml index 40a42f8b09..ade5a90bab 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml @@ -848,6 +848,11 @@ - python-havana-bitrot-jobs - openstack-publish-jobs - translation-jobs + - '{pipeline}-neutron-dsvm-functional{branch-designator}': + pipeline: check + node: 'devstack-precise || devstack-precise-check' + branch-designator: '' + branch-override: default - project: diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml index 4b61b15c33..82408a7648 100644 --- a/modules/openstack_project/files/zuul/layout.yaml +++ b/modules/openstack_project/files/zuul/layout.yaml @@ -764,6 +764,7 @@ projects: - check-tempest-dsvm-neutron-isolated-parallel - gate-grenade-dsvm-neutron-forward - neutron-upstream-translation-update + - check-neutron-dsvm-functional pre-release: - neutron-tarball release: