some python test cases don't care about backend, so run them in any case

pull/7436/head
Michael Hirsch 5 years ago
parent 4f1a240bc2
commit 895de87b90
No known key found for this signature in database
GPG Key ID: 6D23CDADAB0294F9
  1. 2
      run_project_tests.py
  2. 4
      test cases/python/2 extmodule/meson.build
  3. 35
      test cases/python/3 cython/meson.build
  4. 4
      test cases/python/4 custom target depends extmodule/meson.build

@ -939,7 +939,7 @@ def detect_tests_to_run(only: T.List[str], use_tmp: bool) -> T.List[T.Tuple[str,
# CUDA tests on Windows: use Ninja backend: python run_project_tests.py --only cuda --backend ninja
TestCategory('cuda', 'cuda', backend not in (Backend.ninja, Backend.xcode) or not shutil.which('nvcc')),
TestCategory('python3', 'python3', backend is not Backend.ninja),
TestCategory('python', 'python', backend is not Backend.ninja),
TestCategory('python', 'python'),
TestCategory('fpga', 'fpga', shutil.which('yosys') is None),
TestCategory('frameworks', 'frameworks'),
TestCategory('nasm', 'nasm'),

@ -3,6 +3,10 @@ project('Python extension module', 'c',
# Because Windows Python ships only with optimized libs,
# we must build this project the same way.
if meson.backend() != 'ninja'
error('MESON_SKIP_TEST: Ninja backend required')
endif
py_mod = import('python')
py = py_mod.find_installation()
py_dep = py.dependency()

@ -1,20 +1,27 @@
project('cython', 'c',
default_options : ['warning_level=3'])
cython = find_program('cython3', required : false)
py3_dep = dependency('python3', required : false)
if meson.backend() != 'ninja'
error('MESON_SKIP_TEST: Ninja backend required')
endif
if cython.found() and py3_dep.found()
py_mod = import('python')
py3 = py_mod.find_installation()
py3_dep = py3.dependency()
subdir('libdir')
cython = find_program('cython', required : false)
if not cython.found()
error('MESON_SKIP_TEST: Cython3 not found.')
endif
test('cython tester',
py3,
args : files('cytest.py'),
env : ['PYTHONPATH=' + pydir]
)
else
error('MESON_SKIP_TEST: Cython3 or Python3 libraries not found, skipping test.')
py3_dep = dependency('python3', required : false)
if not py3_dep.found()
error('MESON_SKIP_TEST: Python library not found.')
endif
py_mod = import('python')
py3 = py_mod.find_installation()
py3_dep = py3.dependency()
subdir('libdir')
test('cython tester',
py3,
args : files('cytest.py'),
env : ['PYTHONPATH=' + pydir]
)

@ -3,6 +3,10 @@ project('Python extension module', 'c',
# Because Windows Python ships only with optimized libs,
# we must build this project the same way.
if meson.backend() != 'ninja'
error('MESON_SKIP_TEST: Ninja backend required')
endif
py_mod = import('python')
py3 = py_mod.find_installation()
py3_dep = py3.dependency(required : false)

Loading…
Cancel
Save