Execute existing neutron tests on upstream CI

Change-Id: I53bdbb535bca8f56399927a85d8cf0e766a5808b
This commit is contained in:
Federico Ressi 2018-12-12 08:40:59 +01:00
parent de74a79bd3
commit e4ea6d5212
4 changed files with 40 additions and 2 deletions

View File

@ -20,3 +20,7 @@
- hosts: all
roles:
- orchestrate-devstack
- hosts: tempest
roles:
- run-tox

View File

@ -0,0 +1,3 @@
tox_dir: /opt/stack/tobiko
tox_envlist: neutron
tox_extra_args: ''

View File

@ -0,0 +1,29 @@
# The number of vcpus is not available on all systems.
# See https://github.com/ansible/ansible/issues/30688
# When not available, we fall back to ansible_processor_cores
- name: Get hw.logicalcpu from sysctl
shell: sysctl hw.logicalcpu | cut -d' ' -f2
register: sysctl_hw_logicalcpu
when: ansible_processor_vcpus is not defined
- name: Number of cores
set_fact:
num_cores: "{{ansible_processor_vcpus|default(sysctl_hw_logicalcpu.stdout)}}"
- name: Set concurrency for cores == 3 or less
set_fact:
default_concurrency: "{{ num_cores }}"
when: num_cores|int <= 3
- name: Limit max concurrency when more than 3 vcpus are available
set_fact:
default_concurrency: "{{ num_cores|int // 2 }}"
when: num_cores|int > 3
- name: Run Tobiko
command: tox -e {{tox_envlist}} {{tox_extra_args}} -- --concurrency={{default_concurrency}}
args:
chdir: "{{tox_dir}}"
become: true
become_user: stack

View File

@ -11,6 +11,7 @@
set the nodeset to a multi-node one.
required-projects:
- openstack-infra/devstack-gate
- openstack/heat
- openstack/neutron
- openstack/tobiko
timeout: 7200
@ -19,6 +20,7 @@
USE_PYTHON3: true
NETWORK_API_EXTENSIONS: address-scope,agent,allowed-address-pairs,auto-allocated-topology,availability_zone,binding,default-subnetpools,dhcp_agent_scheduler,dns-domain-ports,dns-integration,dvr,empty-string-filtering,ext-gw-mode,external-net,extra_dhcp_opt,extraroute,filter-validation,fip-port-details,flavors,ip-substring-filtering,l3-flavors,l3-ha,l3_agent_scheduler,logging,metering,multi-provider,net-mtu,net-mtu-writable,network-ip-availability,network_availability_zone,pagination,port-security,project-id,provider,qos,qos-bw-minimum-ingress,qos-fip,quotas,quota_details,rbac-policies,router,router_availability_zone,security-group,port-mac-address-regenerate,port-security-groups-filtering,segment,service-type,sorting,standard-attr-description,standard-attr-revisions,standard-attr-segment,standard-attr-timestamp,standard-attr-tag,subnet_allocation,trunk,trunk-details,uplink-status-propagation
devstack_plugins:
heat: git://git.openstack.org/openstack/heat.git
neutron: git://git.openstack.org/openstack/neutron.git
tobiko: git://git.openstack.org/openstack/tobiko.git
devstack_services:
@ -47,8 +49,8 @@
log: true
yaml: true
yml: true
run: playbooks/devstack.yaml
# post-run: playbooks/post-tobiko.yaml
run: playbooks/tobiko-devstack.yaml
# post-run: playbooks/post-tobiko-devstack.yaml
irrelevant-files:
- ^.*\.rst$
- ^api-ref/.*$