2019-11-12 23:51:27 +00:00
|
|
|
import os
|
2020-02-20 17:29:28 -05:00
|
|
|
import platform
|
2019-11-12 23:51:27 +00:00
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
2019-04-22 18:22:43 +01:00
|
|
|
import utils
|
|
|
|
|
|
2019-11-12 23:51:27 +00:00
|
|
|
|
2019-04-22 18:22:43 +01:00
|
|
|
def test():
|
2019-04-22 23:13:34 +01:00
|
|
|
project_dir = os.path.dirname(__file__)
|
2019-04-22 23:25:14 +01:00
|
|
|
|
2020-02-21 09:32:09 -05:00
|
|
|
if utils.platform != 'linux':
|
2019-08-27 16:03:09 +02:00
|
|
|
pytest.skip('the test is only relevant to the linux build')
|
2020-02-21 09:32:09 -05:00
|
|
|
if platform.machine() not in ['x86_64', 'i686']:
|
|
|
|
|
pytest.skip('this test is currently only possible on x86_64/i686 due to availability of alternative images')
|
2019-04-22 18:22:43 +01:00
|
|
|
|
2019-11-20 22:20:53 +01:00
|
|
|
actual_wheels = utils.cibuildwheel_run(project_dir, add_env={
|
2019-08-18 00:42:35 +02:00
|
|
|
'CIBW_MANYLINUX_X86_64_IMAGE': 'dockcross/manylinux2010-x64',
|
2020-01-30 17:20:14 +01:00
|
|
|
'CIBW_MANYLINUX_I686_IMAGE': 'dockcross/manylinux2010-x86',
|
2020-02-13 10:52:46 +01:00
|
|
|
'CIBW_SKIP': 'pp*',
|
2019-04-22 23:23:49 +01:00
|
|
|
})
|
2019-04-22 18:22:43 +01:00
|
|
|
|
2019-04-23 22:14:17 +01:00
|
|
|
# also check that we got the right wheels built
|
2019-10-30 17:05:17 +01:00
|
|
|
expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0')
|
2019-12-13 21:52:40 +01:00
|
|
|
if '-pp' not in w]
|
2019-04-23 22:14:17 +01:00
|
|
|
assert set(actual_wheels) == set(expected_wheels)
|