aboutsummaryrefslogtreecommitdiff
path: root/test cases/csharp
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-02-25 01:09:18 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-02-25 01:10:56 +0200
commit2488ccfa1c6fbb27623ed09238b8b5ea2be5ed10 (patch)
treedfe78833e58ce135ae07ea89907c9d0d18802392 /test cases/csharp
parentc48b9594ff1ffc9dacdcb0f4fca6f459b95989f5 (diff)
downloadmeson-2488ccfa1c6fbb27623ed09238b8b5ea2be5ed10.zip
meson-2488ccfa1c6fbb27623ed09238b8b5ea2be5ed10.tar.gz
meson-2488ccfa1c6fbb27623ed09238b8b5ea2be5ed10.tar.bz2
Skip tests if deps are not found.
Diffstat (limited to 'test cases/csharp')
-rw-r--r--test cases/csharp/4 external dep/meson.build7
-rw-r--r--test cases/csharp/4 pkgconfig/meson.build7
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)