From 4a8a2713433154aee21f1f83ef3e9e7dc9466275 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 12 Feb 2020 09:44:04 +0100 Subject: Fix running the PySide2 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 the environment variables BUILD_DIR and QT_DIR pointing to the build directory and Qt directory, respectively, 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 and QT_DIR instead of a complex manipulation of PATH/LD_LIBRARY_PATH. Change-Id: I7d518ccab19ca184c3112a126c779d4a6d7c6c5e Reviewed-by: Qt CI Bot Reviewed-by: Christian Tismer Reviewed-by: Cristian Maureira-Fredes --- sources/pyside2/tests/pysidetest/signal_slot_warning.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sources/pyside2/tests/pysidetest/signal_slot_warning.py') diff --git a/sources/pyside2/tests/pysidetest/signal_slot_warning.py b/sources/pyside2/tests/pysidetest/signal_slot_warning.py index 84ddc23de..a54974c3b 100644 --- a/sources/pyside2/tests/pysidetest/signal_slot_warning.py +++ b/sources/pyside2/tests/pysidetest/signal_slot_warning.py @@ -33,11 +33,17 @@ from __future__ import print_function -import unittest -import PySide2.QtCore as QtCore +import os import sys +import unittest import warnings +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + +import PySide2.QtCore as QtCore + class Whatever(QtCore.QObject): echoSignal = QtCore.Signal(str) -- cgit v1.2.3