diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-25 01:09:18 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-25 01:10:56 +0200 |
commit | 2488ccfa1c6fbb27623ed09238b8b5ea2be5ed10 (patch) | |
tree | dfe78833e58ce135ae07ea89907c9d0d18802392 | |
parent | c48b9594ff1ffc9dacdcb0f4fca6f459b95989f5 (diff) | |
download | meson-2488ccfa1c6fbb27623ed09238b8b5ea2be5ed10.zip meson-2488ccfa1c6fbb27623ed09238b8b5ea2be5ed10.tar.gz meson-2488ccfa1c6fbb27623ed09238b8b5ea2be5ed10.tar.bz2 |
Skip tests if deps are not found.
-rw-r--r-- | test cases/csharp/4 external dep/meson.build | 7 | ||||
-rw-r--r-- | test cases/csharp/4 pkgconfig/meson.build | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/test cases/csharp/4 external dep/meson.build b/test cases/csharp/4 external dep/meson.build index 004d25f..019d618 100644 --- a/test cases/csharp/4 external dep/meson.build +++ b/test cases/csharp/4 external dep/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')]) diff --git a/test cases/csharp/4 pkgconfig/meson.build b/test cases/csharp/4 pkgconfig/meson.build index e2ba035..3062fca 100644 --- a/test cases/csharp/4 pkgconfig/meson.build +++ b/test cases/csharp/4 pkgconfig/meson.build @@ -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) |