Skip tests if deps are not found.

pull/3132/head
Jussi Pakkanen 7 years ago
parent c48b9594ff
commit 2488ccfa1c
  1. 7
      test cases/csharp/4 external dep/meson.build
  2. 7
      test cases/csharp/4 pkgconfig/meson.build

@ -1,4 +1,9 @@
project('C# external library', 'cs')
glib_sharp_2 = dependency('glib-sharp-2.0')
glib_sharp_2 = dependency('glib-sharp-2.0', required : false)
if not glib_sharp_2.found()
error('MESON_SKIP_TEST glib# not found.')
endif
e = executable('prog', 'prog.cs', dependencies: glib_sharp_2, install : true)
test('libtest', e, args: [join_paths(meson.current_source_dir(), 'hello.txt')])

@ -1,6 +1,11 @@
project('C# pkg-config', 'cs')
nunit_dep = dependency('nunit')
nunit_dep = dependency('nunit', required : false)
if not nunit_dep.found()
error('MESON_SKIP_TEST nunit not found.')
endif
nunit_runner = find_program('nunit-console')
test_lib = library('test_lib', 'test-lib.cs', dependencies: nunit_dep)

Loading…
Cancel
Save