[gtk/fix-introspection-tests-win] Introspection test: Reverse os.add_dll_directory() order
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-introspection-tests-win] Introspection test: Reverse os.add_dll_directory() order
- Date: Tue, 26 Apr 2022 03:22:16 +0000 (UTC)
commit ad554a92d81b9e2cce2c9ca8f4cbc5cbf0586784
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Apr 26 11:19:16 2022 +0800
Introspection test: Reverse os.add_dll_directory() order
It looks like os.add_dll_directory() works in a LIFO order, so we call
os.add_dll_directory() from the end of the list of directories in %PATH%
so that the directories are searched in the correct order.
testsuite/introspection/api.py | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/testsuite/introspection/api.py b/testsuite/introspection/api.py
index e9bd6a8868..54b58e83bc 100755
--- a/testsuite/introspection/api.py
+++ b/testsuite/introspection/api.py
@@ -10,6 +10,7 @@ import sys
# by calling os.add_dll_directory() on the valid paths in %PATH%.
if hasattr(os, 'add_dll_directory'):
paths = os.environ['PATH'].split(os.pathsep)
+ paths.reverse()
for path in paths:
if path != '' and os.path.isdir (path):
os.add_dll_directory(path)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]