aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Enhance testrunner to ignore old test logsChristian Tismer2018-01-051-0/+8
| | | | | | | | | | | | | Testrunner had a virtual problem: When running testrunner without building the project again, and the test skips some runs that were not skipped before, then it will fetch an old test log from the former run. Cure: We check all logfiles first. If a file exists and skip is not set, then we remove the file. Then normal testing starts. Change-Id: Ib91baca97d3b0a5c0b68a8022fca52202b20e862 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Signature existence tests: Fix generation of the signature fileFriedemann Kleint2018-01-042-5/+7
| | | | | | | | Amends cd1037060e0cbc263e601fb67fbd40d85c8801a1. Task-number: PYSIDE-510 Change-Id: Ic93a6ef4ab846b07b369f691f52240aeedbfbec3 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Remove sync.profile which is no longer usedChristian Tismer2017-12-281-19/+0
| | | | | | | | | | | | | | | | sync.profile was checked in on 2016-07-29 and since then never changed. I asked Simo Fällt about its future: """ Sync.profile was used to declare ci dependencies between modules. Each and every Qt tmodule had its own sync.profile listing its had and soft dependendencies. I added that file for Pyside (when 5.6 was only branch), but soon after that, COIN stopped supporting that way of specifying dependencies. So in other words, that file is useless. """ Change-Id: I0a2aafd94a80542d94d8be44e0b322493fbc2d0c Reviewed-by: Simo Fält <simo.falt@qt.io>
* small enhancement for testrunnerChristian Tismer2017-12-223-20/+18
| | | | | | | | | | | | The new testrunner now has the multiple test feature. We refine and correct the summary view a little bit, remove more dead code, add some comments and improve the output slightly. Change-Id: I152bf5cbe2171fb07de7e88054a42fc767dc14c0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simo Fält <simo.falt@qt.io>
* testrunner 5: Improve the algorithmChristian Tismer2017-12-215-67/+245
| | | | | | | | | | | | | | | | | | | | | | Testrunner checks if it is running in COIN. If so, it runs each tested project 5 times and reports an error if 3 errors were found in a test function and not blacklisted. The time is measured, so we know if we can run all the tests five times or if we can run only the failed tests. At the moment, the option COIN_RERUN_FAILED_ONLY is activated by default. We can configure it by setting to false. Since this change turns the registry existence test into a flaky test (te tests generates it's missing file in the first run), the registry existence test is no more blacklisted. We simulate our own tee command now with decorated output. Task-number: PYSIDE-578 Change-Id: I6390cd50398a97a168c85c6bb778984c6a5b90fc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testrunner 4: Improve the error listingChristian Tismer2017-12-212-3/+3
| | | | | | | | A simple change that makes the "FAIL!" entries easy to find. Task-number: PYSIDE-578 Change-Id: I953bf94912f101208c1cddb7772aa0c34e9ca1a8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testrunner 3: Replace (n)make and tee by ctestChristian Tismer2017-12-212-60/+73
| | | | | | | | | | | | | Before working on the algorithm, we simplify the testrunner by using ctest directly. This has also the advantage that we can control much better how the output is generated. By interrogating the Makefile, we can now detect early if ctest was configured in setup.py . Task-number: PYSIDE-578 Change-Id: I1157576bf5806044465d7a1409c3d26810f33f62 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testrunner 2: Remove unused code and clean upChristian Tismer2017-12-212-235/+14
| | | | | | | | | | | Testrunner contains old learning code for blacklist that was never used. We remove that code. The new display of environment was correctly placed and reformatted. Task-number: PYSIDE-578 Change-Id: Ia508314aa1a87d07522386342059c14cb1254400 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testrunner 1: Turn into a packageChristian Tismer2017-12-218-787/+1100
| | | | | | | | | | | | | Testrunner is a medium-large module that has a number of different purposes. Since we want to improve the testing logic, it is better to clean the module up before adding even more code. For compatibitity, the testrunner module will stay in place, but redirect everything into the new "testing" package. Task-number: PYSIDE-578 Change-Id: I3d14f3c4c421cdd2bb7777691b56677aa4786dd8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* blacklist.txt: Remove duplicate entryFriedemann Kleint2017-12-211-4/+0
| | | | | Change-Id: Ie1b0e43f876cb4ac4228457ccb49ab43e63affe1 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Signature existence tests: Fall back to previous patch releasesFriedemann Kleint2017-12-212-18/+51
| | | | | | | | | | | In case the reference file for a given patch release does not exist, fall back to a previous one. Replace variables in the init_platform module by functions getEffectiveRefPath(), getRefPath(). Task-number: PYSIDE-510 Change-Id: I208f4618be6e20be5023938850ca0eacc43b0101 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Adjust inheritance_diagram.py exception to Python 3 syntaxChristian Tismer2017-12-211-1/+1
| | | | | | | | The file inheritance_diagram.py still had the old python 2 syntax. Obviously nobody tried to build documentation in Python 3... Change-Id: I0e245940a2593a1a5e93c7f538d8e73ca1001a0f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QtCore test bug829 to run on WindowsFriedemann Kleint2017-12-192-7/+20
| | | | | | | | | | | | | | The test used Python functionality to create a temporary file which caused an access error on Windows, apparently due to the file still being open. Besides, the temporary file was leaked. Rewrite using QTemporaryFile and make sure the file is closed and the QTemporaryFile is deleted before using it and delete it in __del__(). Task-number: PYSIDE-431 Change-Id: I5d63e76ead7169d9f3f2267ee53aa91b601a3968 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Blacklist flaky QtCore::qthread_prod_cons_test testAlexandru Croitor2017-12-051-0/+4
| | | | | | Change-Id: I4813d79f6f4acb4dc47ec7dbfdee111de76a2fde Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Unify signature registry for py2 / py3 and clean upChristian Tismer2017-12-056-88/+161
| | | | | | | | | | | | | | | | | | | | | | | | | It turned out that there are tiny differences between Python2 and Python3 which make the versions of the registry almost, but not totally equal. There are functions which are slot wrappers in Python2 instead of method wrappers in Python3, and we currently don't support slot wrappers. There are other tiny differences when we switch to Qt 5.9, too. Initially, I thought to split the files for Python2 and Python3, but then it turned out that the problems vanish when we ignore the 'next' and '__next__' functions in both python versions. The filter function is both applied to the generating function and the testing function. Therefore we can keep the existing data intact. I further removed an indentation leftover in cppgenerator.cpp, fixed handling of duplicate entries and improved modularisation of the signature enumerator and formatter. This part will later be moved into the signature library. Task-number: PYSIDE-510 Change-Id: I18f5e8f08fb9b07534003919abe55ab4dafeb2c2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix signature registry on Python2 with .pyc files, part 2Christian Tismer2017-12-043-49/+45
| | | | | | | | | | | | | | There is unfortunately another bad side effect with .pyc files. I had to make sure that not the __file__ attribute is used, but the correct filename is computed, because __file__ can refer to the .pyc file under certain circumstances. Improved error handling, more file type checks and short filenames relative to the project path added for convenience. Task-number: PYSIDE-510 Change-Id: Ia0002fdfb382b7d3681156b1aef42739eb22dcc9 Reviewed-by: Simo Fält <simo.falt@qt.io>
* libpyside: Fix code forwarding Python exceptions to JSFriedemann Kleint2017-11-301-14/+4
| | | | | Change-Id: I6dffab506814e1d33812ed23b3e3920882b6c4e6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix signature registry on Python2 with .pyc filesChristian Tismer2017-11-302-8/+11
| | | | | | | | | | | | | | | | | There was a problem on Python2 when ci was activated. Because there are .pyc files in the same folder, a leftover .pyc file would be imported and lead to weird results. This problem is not recognized now, but would have effects when we turn on the multiple testing. The intended behavior is that a tests generates an error and a listing once and succeeds for the repeated test runs. This worked in Python3. Now this works the same with Python2. Task-number: PYSIDE-510 Change-Id: Id892715faa8eee1322b28c7e109f3b0b7329f12c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix testrunner to parse blacklist correctly on Qt5.xx.yChristian Tismer2017-11-301-12/+4
| | | | | | | | | | | | | testrunner had a simple extension that propagated classifiers like Qt5.6.4 to Qt5.6 and Qt5. This extension was not able to recognize Qt5.11.0 . It was a known omission in testrunner.py that was commented but ignored in the reviews. (#35 on 2016-09-16 and #42 on 2016-09-22) This patch corrects that omission. Change-Id: I0b17c40b46af0572123a503a83db115b488bb87a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* FIXUP: Make standalone option work on LinuxAlexandru Croitor2017-11-281-1/+1
| | | | | | | | | There was an indentation error in the rpath linux handling function, which ended up not adding any rpaths in regular builds, thus breaking PySide2 module importing. Change-Id: I18488f78aca50435f69ce091e46a77e4ec55d396 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Blacklist existence test for dev=5.11Christian Tismer2017-11-281-0/+3
| | | | | | | At the moment, we don't want to activate this. Change-Id: Ie5ccb3513dce776cff20ee29b992a6aadc88320f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* signature: Support a new constant for QOpenGLChristian Tismer2017-11-282-1/+2
| | | | | | | | | | | There are QOpenGLFunctions::glGetString() etc. Some platforms have new, unrecognized constants. I also reverted a change to parser.py to accept all regular exceptions, again. It makes little sense to be explicit, here. Change-Id: I7e0289ed074c1452ad163f68fdc6d35f046844e2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Blacklist flaky QtCore_qthread_signal_testAlexandru Croitor2017-11-271-0/+4
| | | | | Change-Id: I772d789bd3c8628594f35c60738f2decf5e96aa1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Create a function existence registryChristian Tismer2017-11-272-2/+16639
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. The linux2 and linux platforms are now unified. There will be a new version of testrunner.py which is more versatile. In future, this teach-in process will be made much easier because we will be able to view the initial versions without raising an error. Done: linux 5.6.4 Done: darwin 5.6.4 Done: win32 5.6.4 Done: darwin 5.9.3 Done: linux 5.9.3 Done: win32 5.9.3 Task-number: PYSIDE-510 Change-Id: I4e3953f9d8e781ae170b455dc7884da9bf632f47 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Create a function existence registryChristian Tismer2017-11-277-69274/+37211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. The linux2 and linux platforms are now unified. There will be a new version of testrunner.py which is more versatile. In future, this teach-in process will be made much easier because we will be able to view the initial versions without raising an error. Done: linux 5.6.4 Done: darwin 5.6.4 Done: win32 5.6.4 Done: darwin 5.9.3 Done: linux 5.9.3 Task-number: PYSIDE-510 Change-Id: Ib57e1e1771649c95435132a9fc65d86f4a3df05b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken: Do not generate richcompare methods for namespacesFriedemann Kleint2017-11-243-4/+15
| | | | | | | | | | | | | | | | shiboken used to generate richcompare methods for namespaces when it contained free comparison operators for classes in that namespace, resulting in compile errors. For example: namespace Qt3DRender { bool operator!=(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample) ... Add a check preventing that. Task-number: PYSIDE-487 Change-Id: If2fa1de1bfb0fdc11c9415421dab0c7e13abc500 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Create a function existence registryChristian Tismer2017-11-243-9648/+25921
| | | | | | | | | | | | | | | | | | | | | | | | 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 Done: darwin 5.9.3 Done: linux2 5.9.3 Done: linux 5.9.3 Task-number: PYSIDE-510 Change-Id: I32dfd5fcd56ca8d91d48a81959cc762cd5340c68 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Skip some permanently failing tests and blacklist flaky onesAlexandru Croitor2017-11-243-2/+10
| | | | | Change-Id: Idcbf62b58f097370f61a27d0f16bce630e817526 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Create a function existence registryChristian Tismer2017-11-241-0/+16246
| | | | | | | | | | | | | | | | | | | | | | | 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 Done: darwin 5.9.3 Done: linux2 5.9.3 Task-number: PYSIDE-510 Change-Id: I00cc1a4854a8149a40659c04d81ffd3e6db64bc8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Testrunner.py: Output environment and some information from sysFriedemann Kleint2017-11-241-0/+5
| | | | | | Task-number: PYSIDE-431 Change-Id: I55d8a1b71ed23fd887e2d65a34a6dc0b48568c07 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Create a function existence registryChristian Tismer2017-11-243-1/+16464
| | | | | | | | | | | | | | | | | | | | | | 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 Done: darwin 5.9.3 Task-number: PYSIDE-510 Change-Id: Ib366f60d527ee8b043c7ee16430fdda42c707cfe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* Investigate the sporadic segfaults on RHELChristian Tismer2017-11-231-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | Lately, the RHEL platform tends to segfault between 0-4 times in a test run. I suspect that is related to some finalization code that is triggered at a special time, due to a stressy situation. But we don't know until we ask the CI system by printing a stack trace. This patch prints a stack dump after a segfault happened. The dump is only activated when the environment setting QTEST_ENVIRONMENT=ci is true. (The above needs to be compared with strcmp or strstr) Note that the tests _are not isolated_. I recognized that by the warnings module that leaked between tests. The processes are shared, unless you have setup and teardown functions. There might for instance be some hidden refcount bug that triggers only early enough in a stress situation. Change-Id: Ibbc592e7bdcbdd3cdbc06f203be3e5fc1daaf774 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Create a function existence registrymaya1Christian Tismer2017-11-1912-12/+62731
| | | | | | | | | | | | | | | | | | | | | 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>
* Update description of standalone option in setup.pyAlexandru Croitor2017-11-151-1/+3
| | | | | | | | | Mention that it is usable on Linux and macOS, whereas on Windows it is used implicitly. Change-Id: I17f2086e7d4f9ac9ac084bddbcf73644af4bc0d4 Task-number: PYSIDE-558 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Make standalone installations relocatableAlexandru Croitor2017-11-156-5/+176
| | | | | | | | | | | | | | | | | | 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>
* Make standalone option work on WindowsAlexandru Croitor2017-11-151-0/+20
| | | | | | | Change-Id: Ib2429a3cefb9ecc8804d384f9560e15d27d48198 Task-number: PYSIDE-558 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Make standalone option work on LinuxAlexandru Croitor2017-11-152-40/+69
| | | | | | | | | | | | | Changes were made to copy the correct Qt shared libraries into the package (updated to Qt5 naming). A new rpath value will be inserted alongside $ORIGIN, to point to the copied over libraries. Also because symlinks are not supported by wheels, the actual Qt libraries have to be copied instead of the symlinks. Change-Id: I656a89a0b0136a290752bca141125bdeb5bb44d5 Task-number: PYSIDE-558 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix rpath handling on LinuxAlexandru Croitor2017-11-151-1/+10
| | | | | | | | | | | In addition to adding $ORIGIN, add an RPATH to the Qt lib directory (the one used when building PySide) so that there is no necessity to set LD_LIBRARY_PATH. Change-Id: I0d54da2ef084abbe503bd427b0773481264334e6 Task-number: PYSIDE-558 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Make standalone option work on macOSAlexandru Croitor2017-11-155-34/+157
| | | | | | | | | | | | | | Implements standalone option on macOS, both for .dylib Qt build and framework build. Multiple rules are applied to figure out which files need to be copied into the final package. We also take care to embed a proper LC_RPATH for the PySide libraries, so that they point to the copied over Qt libraries. Change-Id: I442749e7c2318a66a22e3a1dd0ae703fb8943acf Task-number: PYSIDE-558 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Preserve symlinks instead of duplicating filesAlexandru Croitor2017-11-151-1/+39
| | | | | | | | | | | | | | | | | | This change overrides some of the commands provided by distutils / setuptools to preserve symlinks when copying directories. This is mostly to decrease the time spent and amount of space used by copying into the pyside_package, build/xxx and site-packages directories (copying around WebEngine libraries takes a bit of time and space). It is not useful for bdist_wheels or eggs, because Python's zip module does not preserve symlinks when archiving the files. Ultimately this will probably go away, once we figure out which if any of the symlinks are needed. Task-number: PYSIDE-495 Change-Id: I8766266c9ab51d610c9a5377618ab06020637d7d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix rpath handling on macOSAlexandru Croitor2017-11-152-32/+77
| | | | | | | | | | | | | | | | | | This change ultimately allows running python scripts that use PySide2 without setting DYLD_LIBRARY_PATH / DYLD_FRAMEWORK_PATH. It is achieved by embedding a @loader_path LC_RPATH into all PySide shared libraries, so that they can load each other if they have dependencies. Also an additional LC_RPATH is embedded to point to the Qt libraries directory which was used for building PySide2. A new option "--rpath='your_value'" is available to allow manually specifying the rpath value to be embedded into the libraries. Change-Id: Id783196e908877692312b1d40fef4ad0b09f3e68 Task-number: PYSIDE-558 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Blacklist smart_pointer test on all configs because it's flakyAlexandru Croitor2017-11-151-0/+2
| | | | | Change-Id: I180ef64fd2a318b13bf51568ebc4a935f08f8d4e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Update and complete the signature moduleChristian Tismer2017-11-151-1/+2
| | | | | | | | | | This is a small omission that showed up after generating many signatures. It also has support for "PySide2.QtCore.unsigned char" which came with the introduction of QOpenGLFunctions::glGetString() Task-number: PYSIDE-510 Change-Id: Ic07240cd29d423370717e8b76d0ab2e2b50402bd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove QtCore::static_protected_methods_testFriedemann Kleint2017-11-142-60/+0
| | | | | | | | | The test calls QThread::sleep(), which was static protected in Qt 4, but is public in Qt 5. In addition, the test is flaky on macOS. Task-number: PYSIDE-431 Change-Id: Ie0faae785cda61937b3f20290f1dccbcb20bffda Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update and complete the signature moduleChristian Tismer2017-11-147-168/+2465
| | | | | | | | | | | | | | | | | | | | | | | There is now an external typing module for Python 2.7 and Python 3.6 from Guido (PSF license again) that makes the differences between both versions vanish. Also, when generating interface files, some types did not show correctly, and the constant "0" is wrong in almost all cases. Values in signatures looked often bad since they have no nice __repr__, and it was almost impossible to create correct .pyi files. Now, these instances are created as wrapped string types with a nice __repr__. A call of these objects creates the real constant. This way, also objects can be rendered which are dependent from the existence of other objects (i.E. QPixMap). This patch improves the usability of the signature module. We can now generate source code or .pyi files without modifications. Task-number: PYSIDE-510 Change-Id: I55490d76a29fc6c0e4f821c0c77d5e5d1e28976e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove sys.path manipulations from testAlexandru Croitor2017-11-081-10/+6
| | | | | | | | The sys.path hack is no longer necessary because we pass a proper PYTHONPATH from the CMakeLists file to the test wrapper. Change-Id: Ie9ad8802e64cf7c9ffec16ae55777d5d23654662 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Build QtConcurrent and QtScripttools with MSVC, tooFriedemann Kleint2017-11-081-12/+2
| | | | | Change-Id: I38e8c16c0602b5dbf71dbe3a872630104fabfdb0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* voidptr.cpp: Assign bool directlyFriedemann Kleint2017-11-071-1/+1
| | | | | | | | Fix MVC warning: voidptr.cpp(90): warning C4804: '>': unsafe use of type 'bool' in operation Change-Id: I690becd76320d843e79a56ea792b65fa4cc9a498 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Implement proper void pointer (void*) supportAlexandru Croitor2017-11-0613-49/+556
| | | | | | | | | | | | | | | | | | | | | | | This change introduces a new type into the shiboken2 module which is imported by calling "import PySide2.support.VoidPtr". The type takes care of conversions from / to void* values in function signatures. Creating an instance can be done by passing either a shiboken wrapped object, or an integer representing an address, or a python object that implements the buffer interface. For example, this is useful for passing numpy arrays to C OpenGL functions that take void* parameters. First you convert the array into a bytestring (using numpy.array.tobytes(), then you instantiate a VoidPtr from that bytestring, and finally you pass it along to a GL function. One corner case that is currently not supported is void** parameters. Change-Id: I01e291d6856cb6bd8b5175adc3ead6b728036535 Reviewed-by: Christian Tismer <tismer@stackless.com>