summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-04-30 17:46:54 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2019-05-02 17:00:49 +0800
commitdac89688b7f2c4caf466772125f6a00a668600bd (patch)
treed3a447a2a506180cc84ada394b9db7d47dec81de
parent26f542484ebe88ef231ff36e8853f806dd7ecfd3 (diff)
downloadgobject-introspection-dac89688b7f2c4caf466772125f6a00a668600bd.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"):