Skip to content

Commit dc1c55c

Browse files
committed
Native Zuul v3 tox jobs
Convert the legacy tox jobs to Zuul v3 native and use the tools/test_setup.sh script to setup a XFS file like it's done in the legacy job. Needed-By: Id2b5cff998ac3a825a8f515c7bae3b433f30d272 Change-Id: I34ed9e1c4b822f700e42fb07937df7be72cbaf4e
1 parent d4e6283 commit dc1c55c

File tree

2 files changed

+151
-0
lines changed

2 files changed

+151
-0
lines changed

.zuul.yaml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
- job:
2+
name: swift-tox-base
3+
parent: openstack-tox-py27
4+
description: |
5+
Base job for swift-tox jobs.
6+
7+
It sets TMPDIR to an XFS mount point created via
8+
tools/test-setup.sh.
9+
timeout: 2400
10+
vars:
11+
tox_environment:
12+
TMPDIR: "{{ ansible_env.HOME }}/xfstmp"
13+
14+
- job:
15+
name: swift-tox-py27
16+
parent: swift-tox-base
17+
description: |
18+
Run unit-tests for swift under cPython version 2.7.
19+
20+
Uses tox with the ``py27`` environment.
21+
It sets TMPDIR to an XFS mount point created via
22+
tools/test-setup.sh.
23+
vars:
24+
tox_envlist: py27
25+
26+
- job:
27+
name: swift-tox-py27-centos-7
28+
parent: swift-tox-py27
29+
nodeset: centos-7
30+
31+
- job:
32+
name: swift-tox-py35
33+
parent: swift-tox-base
34+
description: |
35+
Run unit-tests for swift under cPython version 3.5.
36+
37+
Uses tox with the ``py35`` environment.
38+
It sets TMPDIR to an XFS mount point created via
39+
tools/test-setup.sh.
40+
vars:
41+
tox_envlist: py35
42+
bindep_profile: test py35
43+
44+
- job:
45+
name: swift-tox-func
46+
parent: swift-tox-base
47+
description: |
48+
Run functional tests for swift under cPython version 2.7.
49+
50+
Uses tox with the ``func`` environment.
51+
It sets TMPDIR to an XFS mount point created via
52+
tools/test-setup.sh.
53+
vars:
54+
tox_envlist: func
55+
56+
- job:
57+
name: swift-tox-func-centos-7
58+
parent: swift-tox-func
59+
nodeset: centos-7
60+
61+
- job:
62+
name: swift-tox-func-post-as-copy
63+
parent: swift-tox-base
64+
description: |
65+
Run functional tests for swift under cPython version 2.7.
66+
67+
Uses tox with the ``func-post-as-copy`` environment.
68+
It sets TMPDIR to an XFS mount point created via
69+
tools/test-setup.sh.
70+
vars:
71+
tox_envlist: func-post-as-copy
72+
73+
- job:
74+
name: swift-tox-func-post-as-copy-centos-7
75+
parent: swift-tox-func-post-as-copy
76+
nodeset: centos-7
77+
78+
- job:
79+
name: swift-tox-func-encryption
80+
parent: swift-tox-base
81+
description: |
82+
Run functional tests for swift under cPython version 2.7.
83+
84+
Uses tox with the ``func-encryption`` environment.
85+
It sets TMPDIR to an XFS mount point created via
86+
tools/test-setup.sh.
87+
vars:
88+
tox_envlist: func-encryption
89+
90+
- job:
91+
name: swift-tox-func-encryption-centos-7
92+
parent: swift-tox-func-encryption
93+
nodeset: centos-7
94+
95+
- job:
96+
name: swift-tox-func-ec
97+
parent: swift-tox-base
98+
description: |
99+
Run functional tests for swift under cPython version 2.7.
100+
101+
Uses tox with the ``func-post-ec`` environment.
102+
It sets TMPDIR to an XFS mount point created via
103+
tools/test-setup.sh.
104+
branches: ^(?!stable/ocata).*$
105+
vars:
106+
tox_envlist: func-ec
107+
108+
- job:
109+
name: swift-tox-func-ec-centos-7
110+
parent: swift-tox-func-ec
111+
nodeset: centos-7
112+
113+
- project:
114+
name: openstack/swift
115+
check:
116+
jobs:
117+
- swift-tox-py27
118+
- swift-tox-py35
119+
- swift-tox-func
120+
- swift-tox-func-post-as-copy
121+
- swift-tox-func-encryption
122+
- swift-tox-func-ec
123+
gate:
124+
jobs:
125+
- swift-tox-py27
126+
- swift-tox-py35
127+
- swift-tox-func
128+
- swift-tox-func-post-as-copy
129+
- swift-tox-func-encryption
130+
- swift-tox-func-ec
131+
experimental:
132+
jobs:
133+
- swift-tox-py27-centos-7
134+
- swift-tox-func-centos-7
135+
- swift-tox-func-post-as-copy-centos-7
136+
- swift-tox-func-encryption-centos-7
137+
- swift-tox-func-ec-centos-7

tools/test-setup.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash -xe
2+
3+
# Set up a partition formatted with XFS to use as TMPDIR for our tests.
4+
# OpenStack CI will invoke this script as part of tox based tests.
5+
# The file .zuul.yaml set TMPDIR to $HOME/xfstmp.
6+
7+
# Create a large-ish file that we will mount as a loopback
8+
truncate -s 1GB $HOME/1G_xfs_file
9+
# Format the new file as XFS.
10+
/sbin/mkfs.xfs $HOME/1G_xfs_file
11+
# loopback mount the file
12+
mkdir -p $HOME/xfstmp
13+
sudo mount -o loop,noatime,nodiratime $HOME/1G_xfs_file $HOME/xfstmp
14+
sudo chmod 777 $HOME/xfstmp

0 commit comments

Comments
 (0)