aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Split The Signature Module After The Project SplitChristian Tismer2018-11-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PySide project has been split into three pieces, including Shiboken. This had far-reaching consequences for the signature project. Shiboken can be run together with PySide or alone, with tests or without. In every configuration, the signature module has to work correctly. During tests, the shiboken binary also hides the shiboken module, and we had to use extra efforts to always guarantee the accessibility of all signature modules. This commit is the preparation for typeerrors implemented with the signature module. It has been split off because the splitting is not directly related, besides these unawaited consequences. I re-added and corrected voidptr_test and simplified the calls. Remark.. We should rename shiboken to Shiboken in all imports. I also simplified initialization. After "from PySide2 import QtCore", now a simple access like "type.__signature__" triggers initialization. Further, I removed all traces of "signature_loader" and allowed loading everything from PySide2.support.signature, again. The loader is now needed internally, only. Also, moved the type patching into FinishSignatureInitialization to support modules with no classes at all. The "testbinding" problem was finally identified as a name clash when the same function is also a signal. A further investigation showed that there exists also a regular PySide method with that problem. The test was extended to all methods, and it maps now all these cases to "{name}.overload". Updated the included typing27.py from https://pypi.org/project/typing/ from version 3.6.2 to version 3.6.6 . Task-number: PYSIDE-749 Change-Id: Ie33b8c6b0df5640212f8991539088593a041a05c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Revert "Terrible workaround fix for hanging tests on macOS 10.12"Alexandru Croitor2018-10-311-1/+1
| | | | | | | | | | | | | | Once the qtbase commit (22c1a46a03bc3347afc0e7462e19558283d0e1b7) gets integrated into the qt/qt5 repo for dev branch, we can revert the terrible workaround fix, because it won't be needed anymore. This reverts commit 5cd52cda24bf70bf99f4deec037039df0ab928f5. Task-number: PYSIDE-724 Change-Id: I627c7ec945b864a1c16ba6cd7288807591f70140 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Terrible workaround fix for hanging tests on macOS 10.12Alexandru Croitor2018-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with Qt 5.12-ish (qtbase commit c538a333db4b7526fb4d9a82c06296d2492bf000) the macOS QPA cocoa plugin switched to using layer-backed NSViews. For some unknown reason when building PySide2 with a python.org official interpreter and the above commit, none of the QWidget / NSViews get drawn (-[QNSView drawRect:] is not called). Using an older qtbase with the same official interepreter works. Using the same qtbase with a custom built interpreter works. Using the same qtbase with a custom built interpreter which is the same version as the official one (3.6.5 at the moment) works (built from v3.6.5 source package published on the downloads page). Using the same qtbase with official interpeter does NOT work. Python2 vs Python3 does not matter. Release vs Debug does not matter. I have not been able to build an interpreter with the minimum deployment target set to 10.6 as the official package does (but rather 10.12), so this is still an avenue to try. The terrible workaround is to disable layer-backed views via an environment variable when running testrunner (QT_MAC_WANTS_LAYER). All users would have to do the same for their own applications, otherwise they will not work. Change-Id: Ia9a34f1e7b0b1b4807030cc7acecbefc8f344e84 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Allow building just QtCore bindingsAlexandru Croitor2018-06-221-1/+3
| | | | | | | | | | | | | | | | | | | This change introduces tracking of modules for which bindings will not be built. This allows us to add conditions on disabled modules, and thus disable certain tests. Thus we disable pysidetest test when its dependencies are not met. Due to this, we can now builtd bindings only for QtCore, allowing faster development iteration when touching only QtCore. Note that this only affects which module bindings will be created. Shiboken itself still requires QtCore, QtXml and QtXmlPatterns, as does pyside2-rcc. Change-Id: I75084a1741e7f4c3594e43af0fd9668a0e969c56 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Avoid set parent for QLabel.pixmap()Cristian Maureira-Fredes2018-05-011-0/+1
| | | | | | | | | | | | Setting owner as default to not allow Python to create a copy of the QPixmap associated with the QLabel. The C++ object pointer is acquired through the pixmap() method. A test case was included. Task-number: PYSIDE-150 Change-Id: Ie6975c39cbf49a59ebd478db0e1a0c30fc14864a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix crashes on RHEL 6.6 CI machines due to a race condition in glib2Alexandru Croitor2017-11-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Qt launches the QXcbEventReader thread, by default the created thread dispatcher will call g_thread_init_glib to initialize the glib thread. When libqgtk2 plugin is loaded, the plugin calls gtk_init which also needs to initialize the glib thread library. This can cause a race condition where the xcb thread might not finish initializing all of the glib thread library, but the main thread believes that initializing is done, and thus ends up dereferencing null pointers. Specifically when the glib function g_slice_alloc is called in the main thread, which calls allocator_categorize, the glib initialization flag 'sys_page_size' is checked. This flag can already be set by the call to g_slice_init_nomessage in the xcb thread, but magazine_mutex might not yet be allocated (in g_slice_thread_init_nomessage), and the main thread ends up dereferencing a null pointer mutex. Relevant code can be found at https://sourcecodebrowser.com/glib2.0/2.27.4/gslice_8c_source.html The workaround is to set the QT_NO_GLIB environment variable to 1 when running the tests, so that a regular QEventDispatcherUNIX is used. Thus only the gtk plugin will call the glib initialization function, eliminating the race condition. Note that the issue probably happens only for glib versions < 2.32. The g_thread_init function is deprecated since 2.32, and glib thread initialization is done at the start of the program, as referenced at https://developer.gnome.org/glib/2.32/glib-Deprecated-Thread-APIs.html#g-thread-init Task-number: QTBUG-64716 Change-Id: Ibcccf8f6e0a3299e61dd320eb6d08e29658298e2 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Create a function existence registrymaya1Christian Tismer2017-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | With the signature module, it is now a straight forward task to generate a registry of all known function signatures. We check that these signatures all exist. One file contains all signatures for one platform and version. The test is only activated when run in the CI system. An initial call creates the expected file as output and raises an error. The result can then be picked up from the error log and added to the repository. Done: linux2 5.6.4 Done: darwin 5.6.4 Done: win32 5.6.4 Task-number: PYSIDE-510 Change-Id: I4f406cf72d25fdd2336814f6f20129079b8be54f Reviewed-by: Christian Tismer <tismer@stackless.com>
* Make standalone installations relocatableAlexandru Croitor2017-11-151-1/+1
| | | | | | | | | | | | | | | | | | This is achieved by registering a qt.conf file with a Prefix pointing to a directory relative to the loaded PySide2 module (e.g. QtCore). Thus Qt does not crash due to not finding platform plugins. Because this change would affect tests, which are ran before the PySide package is installed, a new environment variable called PYSIDE_DISABLE_INTERNAL_QT_CONF is introduced. This variable disables the registration of the internal qt.conf file, thus it will not point to a not yet created location, which will allow tests to run as before. Change-Id: I5a96037adfafe1f08ea57535aa4a2a0d1660dfaf Task-number: PYSIDE-558 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* move everying into sources/pyside2Oswald Buddenhagen2017-05-221-0/+61
in preparation for a subtree merge. this should not be necessary to do in a separate commit, but git is a tad stupid about following history correctly without it.