aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/tests/samplebinding/virtualdtor_test.py
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-02-11 08:35:50 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-02-12 11:42:57 +0100
commit21b8ce263ad8990daed8ad2d4d79e6e0cf9e3c10 (patch)
tree624f40aa78f54d0856b6bf293a40d2b246006eec /sources/shiboken2/tests/samplebinding/virtualdtor_test.py
parent125c35014aeb4ae6944f8d2b3cdc673dce7bee3e (diff)
Fix running the shiboken tests for Python 3.8/Windows
On Windows, DLL directories can no longer be specified via the PATH environment variable. They need to be added via os.add_dll_directory(). In order to fix this, move the entire environment setup from CMake to a python helper and set a single environment variable BUILD_DIR pointing to the build directory from CMake. In addition, this has a huge advantage: The tests can also be executed much more easily without ctest from the command line by just setting BUILD_DIR instead of a complex manipulation of PATH/LD_LIBRARY_PATH. Change-Id: I7dceafd2c38fed5320a534322f265489657b95d3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/tests/samplebinding/virtualdtor_test.py')
-rw-r--r--sources/shiboken2/tests/samplebinding/virtualdtor_test.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken2/tests/samplebinding/virtualdtor_test.py b/sources/shiboken2/tests/samplebinding/virtualdtor_test.py
index 388dc29dc..365d31f59 100644
--- a/sources/shiboken2/tests/samplebinding/virtualdtor_test.py
+++ b/sources/shiboken2/tests/samplebinding/virtualdtor_test.py
@@ -31,9 +31,14 @@
'''Test cases for virtual destructor.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import VirtualDtor
class ExtendedVirtualDtor(VirtualDtor):