]> granicus.if.org Git - fribidi/commit
test-runner.py: Fix running on Visual Studio builds
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 27 Feb 2018 04:32:37 +0000 (12:32 +0800)
committerKhaled Hosny <khaledhosny@eglug.org>
Tue, 27 Feb 2018 08:34:18 +0000 (10:34 +0200)
commitc7bd1d06850b921ddc6330746e8fee475a202b88
tree6b20f6d3922092ef4c58deb853e392f3933f931b
parent3d81debadb301b499457afb52b772df64a03724c
test-runner.py: Fix running on Visual Studio builds

On Windows, since we need to be able to find the fribidi DLL when
running the tests that make use of fribidi.exe (which is in
$(builddir)\bin), we need to prepend $(builddir)\lib into %PATH% so that
we can load the fribidi DLL that we just built when running fribidi.exe.

Also, as Visual Studio builds are run in standard Windows cmd.exe consoles,
we need to take account of the output line endings, which are '\r\n',
versus '\n' on *NIX builds.  Since the reference files are in various
encodings (hence we need to deal with binary comparison), we can't just use
universal_newlines when doing subprocess.check_output(), as that will
put us into text mode.

Finally, fix a typo in the error message when the output and reference
don't match.
test/test-runner.py