Skip to content

Commit ecd9a02

Browse files
committed
Adapting tests to new test framework from #137
1 parent 17b8590 commit ecd9a02

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

test/06_docker_images/cibuildwheel_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ def test():
1010
utils.cibuildwheel_run(project_dir, add_env={
1111
'CIBW_MANYLINUX1_X86_64_IMAGE': 'dockcross/manylinux-x64',
1212
'CIBW_MANYLINUX1_I686_IMAGE': 'dockcross/manylinux-x86',
13+
'CIBW_SKIP': '*-manylinux2010_*', # No dockcross image for manylinux2010 (yet)
1314
})
1415

1516
# also check that we got the right wheels built
16-
expected_wheels = utils.expected_wheels('spam', '0.1.0')
17+
expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0')
18+
if '-manylinux2010' not in w]
1719
actual_wheels = os.listdir('wheelhouse')
1820
assert set(actual_wheels) == set(expected_wheels)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import os, pytest
2+
import utils
3+
4+
def test():
5+
project_dir = os.path.dirname(__file__)
6+
7+
if utils.platform != 'linux':
8+
pytest.skip('the docker test is only relevant to the linux build')
9+
10+
# build the wheels
11+
# CFLAGS environment veriable is ecessary to fail on 'malloc_info' (on manylinux1) during compilation/linking,
12+
# rather than when dynamically loading the Python
13+
utils.cibuildwheel_run(project_dir, add_env={
14+
'CIBW_ENVIRONMENT': 'CFLAGS="$CFLAGS -Werror=implicit-function-declaration"',
15+
'CIBW_SKIP': '*-manylinux1_*',
16+
})
17+
18+
# also check that we got the right wheels
19+
expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0')
20+
if '-manylinux1_' not in w]
21+
actual_wheels = os.listdir('wheelhouse')
22+
assert set(actual_wheels) == set(expected_wheels)

test/08_manylinux2010_only/environment.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/shared/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ def expected_wheels(package_name, package_version):
5858
'{package_name}-{package_version}-cp35-cp35m-manylinux1_i686.whl',
5959
'{package_name}-{package_version}-cp36-cp36m-manylinux1_i686.whl',
6060
'{package_name}-{package_version}-cp37-cp37m-manylinux1_i686.whl',
61+
'{package_name}-{package_version}-cp27-cp27m-manylinux2010_x86_64.whl',
62+
'{package_name}-{package_version}-cp27-cp27mu-manylinux2010_x86_64.whl',
63+
'{package_name}-{package_version}-cp34-cp34m-manylinux2010_x86_64.whl',
64+
'{package_name}-{package_version}-cp35-cp35m-manylinux2010_x86_64.whl',
65+
'{package_name}-{package_version}-cp36-cp36m-manylinux2010_x86_64.whl',
66+
'{package_name}-{package_version}-cp37-cp37m-manylinux2010_x86_64.whl',
6167
]
6268
elif platform == 'windows':
6369
templates = [

0 commit comments

Comments
 (0)