summaryrefslogtreecommitdiff
path: root/tests/offsets
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2019-01-01 17:39:34 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2019-01-01 17:40:18 +0100
commit0b09e4a142e81175bc56239c9ae80b5d5dfc6402 (patch)
tree977ae20bdd9b05b46834af2b88ec4cbbf56ac413 /tests/offsets
parentf24c2e61152db69b1cdcc28cb2e714e8b68f4898 (diff)
downloadgobject-introspection-0b09e4a142e81175bc56239c9ae80b5d5dfc6402.tar.gz
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.
Diffstat (limited to 'tests/offsets')
-rw-r--r--tests/offsets/meson.build13
1 files 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