aboutsummaryrefslogtreecommitdiffstats
path: root/testing
Commit message (Collapse)AuthorAgeFilesLines
* testrunner: Fix error message about forgotten --build-testsFriedemann Kleint2019-03-181-1/+1
| | | | | | | | | | Fix variable name changed by f30e4db5169800c25bf79573f650fc2b08d13046, fixing error: NameError global name 'make_path' is not defined Change-Id: Ieee3ba884e122cbc6e2cec267653481552a041d9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Move the .pyqtc files to .pyproject filesFriedemann Kleint2019-03-012-9/+4
| | | | | | | Use the new project file format. Change-Id: I69f488c285343500edd999b746ce244a56504030 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Modernize cmake buildAlexandru Croitor2019-02-071-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a CMake super project that includes the shiboken2, PySide2 and pyside2-tools subprojects, so that it's possible to build everything from Qt Creator (or any other IDE that supports CMake) with minimal set up effort, and thus inform the IDE CMake integration of all relevant files, for easier code editing, navigation and refactoring. This also lays the foundation for allowing 3rd parties to use the shiboken2 generator to generate custom modules. This is achieved by eliminating various hardcoded paths for libraries and include directories. Start using CMake targets throughout the build code to correctly propagate link flags and include dirs for libshiboken and shiboken2 executable targets. Same for the libpyside target. Generate two separate cmake config files (build-tree / install-tree) that can be used with find_package(Shiboken2), to make sure that the PySide2 project can be built as part of the super project build. This is currently the only way I've found to allow the super build to work. Note that for the build-tree find_package() to work, the CMAKE_MODULE_PATH has to be adjusted in the super project file. The generated config files contain variables and logic that allow usage of the installed shiboken package in downstream projects (PySide2). This involves things like getting the includes and libraries for the currently found python interpreter, the shiboken build type (release or debug), was shiboken built with limited api support, etc. Generate 2 separate (build-tree and install-tree) config files for PySide2, similar to how it's done for the shiboken case, for pyside2-tools to build correctly. Install shiboken2 target files using install(EXPORT) to allow building PySide2 with an installed Shiboken2 package (as opposed to one that is built as part of the super project). Same with PySide2 targets for pyside2-tools subproject. Make sure not to redefine uninstall targets if they are already defined. Add a --shorter-paths setup.py option, which would be used by the Windows CI, to circumvent creating paths that are too long, and thus avoiding build issues. Output the build characteristics / classifiers into the generated build_history/YYYY-MM-DD_AAAAAA/build_dir.txt file, so it can be used by the test runner to properly filter out blacklisted tests. This was necessary due to the shorter paths options. Fix various issues regarding target includes and library dependencies. Remove certain duplicated cmake code (like limited api check and build type checks) in PySide2, given that that information will now be present in the exported shiboken2 config file. Include a short README.cmake.md file that describes how to build the super project. References used https://rix0r.nl/blog/2015/08/13/cmake-guide/ https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/ https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1 https://cliutils.gitlab.io/modern-cmake/chapters/basics/functions.html https://cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html https://github.com/ComicSansMS/libstratcom/blob/master/CMakeLists.txt Abandoned approach using ExternalProject references: https://cmake.org/cmake/help/latest/module/ExternalProject.html https://stackoverflow.com/questions/44990964/how-to-perform-cmakefind-package-at-build-stage-only Fixes: PYSIDE-919 Change-Id: Iaa15d20b279a04c5e16ce2795d03f912bc44a389 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Build scripts: Add support for ninjaFriedemann Kleint2018-11-271-11/+23
| | | | | | | | | ninja will be recommended build tool/CMake generator for Qt due to its speed. Streamline the option parsing code and add it. Adapt the test runner to find the ctest command in the ninja build file. Change-Id: I61dd6fd4fb26a50af21432e10e7da86123240e0f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* testrunner.py: Add a small Qt Creator Python project file for editingFriedemann Kleint2018-11-241-0/+9
| | | | | Change-Id: Icc009fde4ac6266f4beaf29b235a6af27d1a7d1d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add tests to install built wheels and build some examplesAlexandru Croitor2018-10-121-0/+295
| | | | | | | | | | | | | | | | | | | | Augment coin_test_instructions.py to run a new script testing/wheel_tester.py, which tries to pip install the built wheels, and then tries to build the samplebinding and scriptableapplication examples. This allows us to confirm that the generated wheels are actually installable, and also hopefully prevent us from breaking the embeddable examples, by making sure that they at least build (and execute in the case of samplebinding). The change also modifies the examples to be able to take the python executable as build argument, so that wheel_tester can specify explicitly which python interpeter to use. Change-Id: I0f141e40ab86e3311dd25915c4e53b0af36aaae9 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Format python files to use PEP8Cristian Maureira-Fredes2018-05-231-9/+9
| | | | | | | Change-Id: I8dc16c10565da8f93ba5cb7cace004f8eaf52236 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Change license from all the filesCristian Maureira-Fredes2018-05-036-6/+6
| | | | | | | | | | | | | | | | | Removing the word 'project' from all the headers, and changing the PySide reference from the examples to Qt for Python: The following line was used inside the source/ and build_scripts/ directory: for i in $(grep -r "the Qt for Python project" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/the\ Qt\ for\ Python\ project/Qt\ for\ Python/g' $i;done and the following line was used inside the examples/ directory: for i in $(grep -r "of the PySide" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/of\ the\ PySide/of\ the\ Qt\ for\ Python/g' $i;done Change-Id: Ic480714686ad62ac4d81c670f87f1c2033d4ffa1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Split and move various setup.py parts into different filesAlexandru Croitor2018-04-301-3/+12
| | | | | | | | | | | | | | | | | This is an initial effort to clean up setup.py. A new directory called build_scripts contains most of the logic for building, leaving setup.py as an entry point. The build_scripts directory contains the usual qtinfo, utils, and the setup.py content has been split into main.py and platform specific files under platforms subfolder. The testrunner script has been modified to find the new location of the utils module. Task-number: PYSIDE-558 Change-Id: I3e041d5116ca5c3f96c789317303b65a7b1bbd70 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Registry: Trigger re-generation of files for Qt3DChristian Tismer2018-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is phase 2. The files are generated. I only changed the date in the license section. After this check-in, the update is done. From Phase 1: The function registry does not contain the new Qt3D module. This produces no error because the test is configured to only break on missing functions but not on new unknown functions. We provoke a reaction of the system by removing of the 5.9 registry files. The system will generate an error once and produce the desired output. But because of the multiple testing, the test will succeed because the generated file exist on the second run and therefore the test will succeed as a flaky test. There is only one run necessary for all platforms at once. A second check-in will then do the update with the generated data. I also had to fix the testrunner to produce a good listing without labels. Task-number: PYSIDE-487 Change-Id: I06a73d244ce306977fd16223eec4dc491fff3429 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-01-121-0/+8
|\ | | | | | | Change-Id: I18387b329e61646e8d68e678140b533281e359cd
| * 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>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-01-051-0/+14
|/ | | | Change-Id: I254cc725505349e73c7abc290afc7abb85156997
* 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-214-64/+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-217-0/+1096
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>