Commit 4c5d7d61 authored by Chun-wei Fan's avatar Chun-wei Fan Committed by Christoph Reiter

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:


instead of:


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.
parent 8e283ff6
Pipeline #79541 passed with stage
in 8 minutes and 2 seconds
......@@ -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"):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment