summaryrefslogtreecommitdiff
path: root/tests/scanner/annotationparser
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-12-20 18:09:10 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2018-12-20 18:09:10 +0100
commit13e8c7ff80f9ff2dc77e9d0da4b7396182c63612 (patch)
treef529b1752c1719c8c8c5396f1a0a732631e0bb66 /tests/scanner/annotationparser
parent698c78f50e5e6ea638bea8f10398bdfe8691ac48 (diff)
downloadgobject-introspection-13e8c7ff80f9ff2dc77e9d0da4b7396182c63612.tar.gz
tests: make scanner tests work with msvc + subprojects
Manually add all the subproject build directories to PATH for running the scanner tests. I'm wondering if meson shouldn't do this for us based on the dependency we pass to test(), but this will do for now.
Diffstat (limited to 'tests/scanner/annotationparser')
-rw-r--r--tests/scanner/annotationparser/meson.build18
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/scanner/annotationparser/meson.build b/tests/scanner/annotationparser/meson.build
index 954dc28d..cce8c5c7 100644
--- a/tests/scanner/annotationparser/meson.build
+++ b/tests/scanner/annotationparser/meson.build
@@ -1,20 +1,14 @@
annotationparser_test_env = environment()
-annotationparser_test_env.append('PYTHONPATH', join_paths(meson.current_build_dir(), '../../../'))
+annotationparser_test_env.prepend('PYTHONPATH', test_env_common_pypath)
+if test_env_common_path.length() > 0
+ annotationparser_test_env.prepend('PATH', test_env_common_path)
+endif
annotationparser_test_files = [
'test_patterns.py',
+ 'test_parser.py',
]
-# FIXME: MSVC
-# from giscanner._giscanner import SourceScanner as CSourceScanner
-# ImportError: DLL load failed: The specified module could not be found.
-if cc.get_id() != 'msvc'
- annotationparser_test_files += [
- 'test_parser.py',
- ]
-endif
-
foreach f : annotationparser_test_files
- test(f, python, args: files(f), env: annotationparser_test_env)
+ test(f, python, args: files(f), env: annotationparser_test_env, depends: [giscanner_pymod])
endforeach
-