[gobject-introspection/win-offset-fixes: 2/2] meson: make test_offsets.py work on Windows
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/win-offset-fixes: 2/2] meson: make test_offsets.py work on Windows
- Date: Tue, 1 Jan 2019 16:41:30 +0000 (UTC)
commit 0b09e4a142e81175bc56239c9ae80b5d5dfc6402
Author: Christoph Reiter <reiter christoph gmail com>
Date: Tue Jan 1 17:39:34 2019 +0100
meson: make test_offsets.py work on Windows
meson doesn't set PATH for the test dependencies so we have to do it manually.
Also make sure the test depends on the test binary.
tests/offsets/meson.build | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/tests/offsets/meson.build b/tests/offsets/meson.build
index 8cb4fa1b..ca1471f2 100644
--- a/tests/offsets/meson.build
+++ b/tests/offsets/meson.build
@@ -11,9 +11,7 @@ test_offsets_lib = shared_library('offsets-1.0',
version: '1.0.0',
)
-# FIXME: See tests/meson.build
-# FIXME: gitestoffsets.exe fails with STATUS_DLL_NOT_FOUND
-if host_system != 'windows'
+if glib_dep.type_name() == 'pkgconfig'
test_offsets_gir = custom_target('gir-offsets',
input: test_offsets_sources + test_offsets_headers,
@@ -51,7 +49,7 @@ if host_system != 'windows'
],
)
- executable('gitestoffsets',
+ gitestoffsets_exe = executable('gitestoffsets',
'gitestoffsets.c',
include_directories : test_offsets_inc,
dependencies: [girepo_dep],
@@ -60,12 +58,15 @@ if host_system != 'windows'
test_offsets_env = environment()
test_offsets_env.set('top_builddir', join_paths(meson.build_root(), 'gir'))
test_offsets_env.set('builddir', meson.current_build_dir())
-
+ if host_system == 'windows'
+ test_offsets_env.prepend('PATH', join_paths(meson.build_root(), 'girepository'))
+ endif
+
test('test_offsets.py',
python,
args: files('test_offsets.py'),
env: test_offsets_env,
- depends: test_offsets_typelib,
+ depends: [gitestoffsets_exe, test_offsets_typelib],
)
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]