[gobject-introspection/fix-gi-tester-stable: 2/2] gi-test: Fix gir file tests
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/fix-gi-tester-stable: 2/2] gi-test: Fix gir file tests
- Date: Fri, 3 May 2019 20:18:42 +0000 (UTC)
commit 4c5d7d610b60fe85174648359e698240a70a1f3c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Apr 30 17:46:54 2019 +0800
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.
tests/gi-tester | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
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"):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]