aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-03-17 22:44:27 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2022-03-18 18:21:21 +0200
commit041c372048130cd54a6430f33f6a927e556554dd (patch)
treed87781c13b2640c0ebf68d1690f7313a7ce170b4 /test cases
parentfe2c0ff1e20403e4c0e26c705e3742d0e1ab1344 (diff)
downloadmeson-041c372048130cd54a6430f33f6a927e556554dd.zip
meson-041c372048130cd54a6430f33f6a927e556554dd.tar.gz
meson-041c372048130cd54a6430f33f6a927e556554dd.tar.bz2
tests: make python2 dependency on 32-bit windows non-fatal
Apparently Azure provides 64-bit python2 when we try to test 32-bit, and that breaks everything on the 32-bit test runner. I don't understand the environment setup, and that runner is disappearing soon anyway. Hopefully this shuts up the known breakage.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/python/8 different python versions/meson.build24
1 files changed, 18 insertions, 6 deletions
diff --git a/test cases/python/8 different python versions/meson.build b/test cases/python/8 different python versions/meson.build
index 90556bc..2655b06 100644
--- a/test cases/python/8 different python versions/meson.build
+++ b/test cases/python/8 different python versions/meson.build
@@ -5,15 +5,27 @@ py_mod = import('python')
py = py_mod.find_installation(get_option('python'), required : false)
+# CI images don't have 32-bit python2 for 32-bit windows,
+# so this actually gets detected then fails
+require = not (
+ get_option('python') == 'python2' and
+ host_machine.system() == 'windows' and
+ host_machine.cpu() == 'x86'
+)
+
if py.found()
- py_dep = py.dependency()
+ py_dep = py.dependency(required: require)
- subdir('ext')
+ if py_dep.found()
+ subdir('ext')
- test('extmod',
- py,
- args : files('blaster.py'),
- env : ['PYTHONPATH=' + pypathdir])
+ test('extmod',
+ py,
+ args : files('blaster.py'),
+ env : ['PYTHONPATH=' + pypathdir])
+ else
+ error('MESON_SKIP_TEST: Python libraries not found, skipping test.')
+ endif
else
error('MESON_SKIP_TEST: Python not found, skipping test.')
endif