summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-04-30 17:46:54 +0800
committerChristoph Reiter <reiter.christoph@gmail.com>2019-05-03 20:18:28 +0000
commit4c5d7d610b60fe85174648359e698240a70a1f3c (patch)
tree7c806a1adf5c5a88216380f8f740feaef98d0dfe
parent8e283ff6eff9b5fd2a7cda259ba4628d7c24eaf4 (diff)
downloadgobject-introspection-4c5d7d610b60fe85174648359e698240a70a1f3c.tar.gz
gi-test: Fix gir file tests
Meson unfortunately does not normalize the paths for us, so we couldn't just rely on it to give us the correct target name without the full target path when the path separator is not '/' (such as on Visual Studio builds, where the path separator is '\\' (with escape character). This means that, that on Visual Studio builds, targetname would be: D:\\gi.build\\tests\\scanner\\Typedefs-1.0.gir instead of: Typedefs-1.0.gir Since we have the targetbase variable which actually has the correct info we need, use that to deduce the correct reference .gir file to compare to.
-rwxr-xr-xtests/gi-tester2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/gi-tester b/tests/gi-tester
index 1c92fe3a..fd51ab50 100755
--- a/tests/gi-tester
+++ b/tests/gi-tester
@@ -93,7 +93,7 @@ def main(argv):
# Ignore this field when determining whether the output succeeded.
ignore = ['shared-library=".*"$']
expected = os.path.join(
- srcdir, os.path.splitext(targetname)[0] + "-expected.gir")
+ srcdir, os.path.splitext(targetbase)[0] + "-expected.gir")
actual = os.path.join(builddir, targetname)
assert_no_diff(expected, actual, ignore=ignore)
elif targetname.rsplit("-")[-1] in ("C", "Python", "Gjs"):