Tests for version constraints on custom lookup dependencies

pull/4035/head
Jon Turney 7 years ago
parent 0f568cc8d5
commit dadf6e2233
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
  1. 3
      test cases/common/190 openmp/meson.build
  2. 4
      test cases/failing/81 framework dependency with version/meson.build
  3. 9
      test cases/failing/82 gl dependency with version/meson.build
  4. 3
      test cases/failing/83 threads dependency with version/meson.build
  5. 3
      test cases/failing/84 gtest dependency with version/meson.build
  6. 3
      test cases/frameworks/1 boost/meson.build
  7. 3
      test cases/frameworks/15 llvm/meson.build
  8. 4
      test cases/frameworks/16 sdl2/meson.build
  9. 3
      test cases/frameworks/17 mpi/meson.build
  10. 3
      test cases/frameworks/18 vulkan/meson.build
  11. 4
      test cases/frameworks/19 pcap/meson.build
  12. 4
      test cases/frameworks/20 cups/meson.build
  13. 4
      test cases/frameworks/21 libwmf/meson.build
  14. 4
      test cases/frameworks/4 qt/meson.build
  15. 4
      test cases/frameworks/9 wxwidgets/meson.build
  16. 4
      test cases/python3/2 extmodule/meson.build

@ -38,3 +38,6 @@ if add_languages('fortran', required : false)
test('OpenMP Fortran', execpp, env : env)
endif
# Check we can apply a version constraint
dependency('openmp', version: '>=@0@'.format(openmp.version()))

@ -0,0 +1,4 @@
project('framework dependency with version')
# do individual frameworks have a meaningful version to test? And multiple frameworks might be listed...
# otherwise we're not on OSX and this will definitely fail
dep = dependency('appleframeworks', modules: 'foundation', version: '>0')

@ -0,0 +1,9 @@
project('gl dependency with version', 'c')
host_system = host_machine.system()
if host_system != 'windows' and host_system != 'darwin'
error('Test only fails on Windows and OSX')
endif
# gl dependency found via system method doesn't have a meaningful version to check
dep = dependency('gl', method: 'system', version: '>0')

@ -0,0 +1,3 @@
project('threads dependency with version', 'c')
# threads dependency doesn't have a meaningful version to check
dep = dependency('threads', version: '>0')

@ -0,0 +1,3 @@
project('gtest dependency with version', ['c', 'cpp'])
# discovering gtest version is not yet implemented
dep = dependency('gtest', version: '>0')

@ -33,3 +33,6 @@ test('Boost nomod', nomodexe)
test('Boost extralib test', extralibexe)
subdir('partial_dep')
# check we can apply a version constraint
dependency('boost', version: '>=@0@'.format(dep.version()))

@ -41,3 +41,6 @@ foreach static : [true, false]
)
endif
endforeach
# Check we can apply a version constraint
dependency('llvm', version: '>=@0@'.format(d.version()))

@ -15,3 +15,7 @@ configdep = dependency('sdl2', method : 'sdlconfig')
# And the modern method name
configdep = dependency('sdl2', method : 'config-tool')
# Check we can apply a version constraint
dependency('sdl2', version: '>=@0@'.format(sdl2_dep.version()), method: 'pkg-config')
dependency('sdl2', version: '>=@0@'.format(sdl2_dep.version()), method: 'config-tool')

@ -42,3 +42,6 @@ if uburesult.returncode() != 0 and add_languages('fortran', required : false)
test('MPI Fortran', exef)
endif
# Check we can apply a version constraint
dependency('mpi', version: '>=@0@'.format(mpic.version()))

@ -8,3 +8,6 @@ endif
e = executable('vulkanprog', 'vulkanprog.c', dependencies : vulkan_dep)
test('vulkantest', e)
# Check we can apply a version constraint
dependency('vulkan', version: '>=@0@'.format(vulkan_dep.version()))

@ -16,3 +16,7 @@ test('pcaptest', e)
# Ensure discovery via the configuration tools work also
pcap_dep = dependency('pcap', version : '>=1.0', method : 'pcap-config')
pcap_dep = dependency('pcap', version : '>=1.0', method : 'config-tool')
# Check we can apply a version constraint
dependency('pcap', version: '>=@0@'.format(pcap_dep.version()), method: 'pkg-config', required: false)
dependency('pcap', version: '>=@0@'.format(pcap_dep.version()), method: 'config-tool')

@ -14,3 +14,7 @@ test('cupstest', e)
# options
dep = dependency('cups', version : '>=1.4', method : 'cups-config')
dep = dependency('cups', version : '>=1.4', method : 'config-tool')
# check we can apply a version constraint
dependency('cups', version: '>=@0@'.format(dep.version()), method: 'pkg-config', required: false)
dependency('cups', version: '>=@0@'.format(dep.version()), method: 'config-tool')

@ -17,3 +17,7 @@ test('libwmftest', e)
dependency('libwmf', method : 'config-tool')
dependency('libwmf', method : 'libwmf-config')
# Check we can apply a version constraint
dependency('libwmf', version: '>=@0@'.format(libwmf_dep.version()), method: 'pkg-config', required: false)
dependency('libwmf', version: '>=@0@'.format(libwmf_dep.version()), method: 'config-tool')

@ -103,5 +103,9 @@ foreach qt : ['qt4', 'qt5']
if qt == 'qt5'
subdir('subfolder')
endif
# Check we can apply a version constraint
dependency(qt, modules: qt_modules, version: '>=@0@'.format(qtdep.version()), method : get_option('method'))
endif
endforeach

@ -12,4 +12,8 @@ if wxd.found()
wx_stc = dependency('wxwidgets', version : '>=3.0.0', modules : ['std', 'stc'])
stc_exe = executable('wxstc', 'wxstc.cpp', dependencies : wx_stc)
test('wxstctest', stc_exe)
# Check we can apply a version constraint
dependency('wxwidgets', version: '>=@0@'.format(wxd.version()))
endif

@ -14,6 +14,10 @@ if py3_dep.found()
py3,
args : files('blaster.py'),
env : ['PYTHONPATH=' + pypathdir])
# Check we can apply a version constraint
dependency('python3', version: '>=@0@'.format(py3_dep.version()))
else
error('MESON_SKIP_TEST: Python3 libraries not found, skipping test.')
endif

Loading…
Cancel
Save