[gtk-doc/win-no-msys: 21/22] Support native Windows shells for the scangobj tests




commit 4c98280e02c4b815d80f8fecc4393f183a61bf69
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Apr 15 12:04:21 2020 +0800

    Support native Windows shells for the scangobj tests
    
    We need to convert the backward slashes which are used for the directory separators on
    native Windows cmd.exe shells so that we add the correct executable PATHs and libpaths.
    
    The scangobj test now passes on Visual Studio builds.

 tests/helpers/gtkdoc_scangobj_runner.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/tests/helpers/gtkdoc_scangobj_runner.py b/tests/helpers/gtkdoc_scangobj_runner.py
index 5bcf4b0..46e502b 100644
--- a/tests/helpers/gtkdoc_scangobj_runner.py
+++ b/tests/helpers/gtkdoc_scangobj_runner.py
@@ -30,7 +30,6 @@ if __name__ == '__main__':
         arg_pos += 1
 
     arguments.insert(arg_pos, os.path.join(options.binary_dir, 'gtkdoc-scangobj'))
-
     process = Popen([options.pkg_config,
                     '--cflags'] + options.extra_pkg,
                     stdout=PIPE, stderr=PIPE)
@@ -53,7 +52,7 @@ if __name__ == '__main__':
 
     for lib in options.extra_lib:
         arguments.append('--ldflags=-l{0}'.format(os.path.basename(lib).split('.')[0].lstrip('lib')))
-        arguments.append('--ldflags=-L{0}'.format(os.path.dirname(lib)))
-        arguments.append('--ldflags=-Wl,-rpath,{0}'.format(os.path.dirname(lib)))
+        arguments.append('--ldflags=-L{0}'.format(os.path.dirname(lib).replace('\\', '/')))
+        arguments.append('--ldflags=-Wl,-rpath,{0}'.format(os.path.dirname(lib).replace('\\', '/')))
 
     sys.exit(call(arguments))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]