Commit Graph

1152 Commits

Author SHA1 Message Date
Amir Masoud Abdol
b171abe695 Remove GENERATE_METATYPES
It doesn't seem like that it is being used anymore, except an instance
in pro2cmake which I replaced by NO_GENERATE_METATYPES.

Pick-to: 6.5
Change-Id: I135cf47e6041e98b354fb684f0079dad30689dea
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-18 14:47:12 +01:00
Mikolaj Boc
8745a73c4f Remove the instance.ENV assignment in js test runner
The assignment crashes with 3.1.25 as instance.ENV is now a read-only
property. This used to be assigned to an empty object, so it was
useless anyway.

Change-Id: I47d4cd831052de514c372adb3f2202d8a0a6e06f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-01-12 17:14:11 +00:00
Jani Heikkinen
d238833a05 Bump version to 6.6.0
Change-Id: I957e8a980542f16d3a3b493b41406bbeb884c2dc
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2022-12-14 20:19:01 +02:00
Alexandru Croitor
146e22fff6 qt-testrunner: Save test output into file
Aside from the generation of the xml and junit xml files
for each test, also save the test output into a
tst_{name}-{timestamp}.txt file.

This will allow developers to inspect the output of passed tests,
by downloading the test results archive, even if we use ctest's
--output-on-failure.

Change-Id: I0a6c0ee04b4525d3ad9b207b28117d2182d29c28
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-08 17:56:48 +01:00
Edward Welbourne
0de7e7a066 LocaleDB: Make passing qtbase root dir on command-lines optional
We can easily enough obtain the root of the present source tree using
the value of __file__, so might as well do so.

Change-Id: If14773ac1127278b6018a090c0b376437b9c6eec
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2022-11-01 19:14:14 +02:00
Marc Mutz
aa37e67ef7 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace, with manual
unstaging of the actual definition and documentation in dist/,
src/corelib/doc/ and src/corelib/global/.

Task-number: QTBUG-99313
Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-11 23:17:18 +02:00
Ievgenii Meshcheriakov
c4e550703c Update UCD to Revision 30
This corresponds to Unicode version 15.0.0.

Added the following scripts:

    * Kawi
    * Nag Mundari

Full support of these scripts requires harfbuzz version 5.2.0,
this version adds support for Unicode 15.0:

    https://github.com/harfbuzz/harfbuzz/releases/tag/5.2.0

Fixes: QTBUG-106810
Change-Id: Ib06c526e49b0f01ef9f21123bcf875c6b19f2601
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-10-11 14:10:59 +00:00
Mikolaj Boc
b9887d51c3 Provide visual output in page in WASM test runner
There will now be a visual output in page if the qvisualoutput query
parameter is supplied. This simplifies debugging.

The main html resource has been renamed test_batch.html to reflect
the name of the actual test unit, not functionality.

Change-Id: Ib6cd4712de9c47cfcc5f670e7b34f998858f99b7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-10-05 00:36:41 +02:00
Mikolaj Boc
bafbffb033 Provide the wasm module correctly to the instantiateWasm callback
The second parameter to the onDone callback in istantiateWasm was
missing in qwasmjsrunner.js, which prevented the wasm module from
working on the threaded qt build.

Change-Id: I5d1be7a2e0d8043112f304b4d2530acdaae7b398
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-10-01 00:31:17 +00:00
Edward Welbourne
914857be08 Fix trivial typo in cldr.py doc-string
Change-Id: I24b039f9256adb3dc7808cd04bd621226b1a5ed5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-14 17:46:39 +02:00
Tor Arne Vestbø
8c7bf85192 testrunner: Use absolute path for JUnit XML result file
Amends 210020412c

Change-Id: Ibe3bbe0bab4370936f82a915ba59a7a89c292ea0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
2022-09-13 21:26:07 +02:00
Mikolaj Boc
7dbbe0a222 Adapt the js batched test runner to emrun interface
This makes the js batched test runner cooperate with emrun.
The runner sends back the output and exit messages to emrun to inform it
about the test execution state.
The code is based on emrun_postjs.js from the emsdk.

Change-Id: I758f2c185797f4000810eb4314423eebc1c5d457
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-09-12 22:28:10 +02:00
Tor Arne Vestbø
210020412c testrunner: Generate JUnit result files
The JUnit format is easier to feed to tools that don't support
the native Qt Test XML format.

Change-Id: Ie9803cc0fb0577b3b7258b05faa78d8fb1aad1d1
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
2022-09-09 19:46:29 +02:00
Liang Qi
012132c60d xcb: use libxcb-cursor to replace Xlib/libXcursor
[ChangeLog][Linux/XCB] Used libxcb-cursor to replace Xlib/libXcursor

Fixes: QTBUG-67373
Change-Id: I04a30e401467e48b431a5cc63984f7b70a09faf0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-09-06 11:21:43 +02:00
Mikolaj Boc
9e05c9ad86 Add error message & format selection capability to batched test runner
Change-Id: I6686bf951204672c3542148e85e59e14e83e73c4
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-09-01 17:29:30 +02:00
Mikolaj Boc
3c9a12934e Implement new features in qt-wasmtestrunner
The script is now able to:
- kill a test that is not responding after certain timeout
- multicast output to files/streams (tee-like, but not only on posix)
- forward requested format (xml/txt/etc.) to the test executable
- run a batched test from a batch test package
- interop with the js batched test runner

Change-Id: Ia189d78a078e11b9efd25865c5a0ddc6a62d9b85
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-08-31 12:47:40 +02:00
Mikolaj Boc
ad1980cd43 Create a driver for running batched tests on WASM
A driver application has been prepared in js for running batched tests.
There is a convenient public API defined for reading the current test
status & subscribing to changes thereof.
The solution is modular - the module qwasmjsruntime can be used for any
wasm instantiation, e.g. in the next iteration of qtloader.

Change-Id: I00df88188c46a42f86d431285ca96d60d89b3f05
Pick-to: 6.4
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-08-24 19:08:58 +02:00
Alexandru Croitor
a310319a04 CMake: Rewrite double-conversion find module
Rename FindWrapDoubleConversion.cmake into
FindWrapSystemDoubleConversion.cmake.
Merge contents of Finddouble-conversion.cmake into the one above.
This allows users to provide their own Finddouble-conversion.cmake
file (Conan can do it).
Don't mark the system package as required, because we have a bundled
one too.
Add link to upstream.
Make sure to show either Config file or library path when one is
found.

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-104541
Change-Id: I9ea2330697c6fc280328849ca11522291c4073d8
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-07-02 00:11:12 +02:00
Dimitrios Apostolou
b152c3b50d sanitizer-testrunner: enforce line buffering
Under coin-agent, the stdout/err are not a tty, so flushing needs to be
forced.

Change-Id: I06de43328a4f4d1c17df7188f31b5f7bc63e3335
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-16 21:04:48 +02:00
Dimitrios Apostolou
1ab354b245 qt-testrunner: Commit forgotten README file
Pick-to: 6.4 6.3 6.2
Change-Id: Ie307b95947a6910bd65bb22ecf938fae9de22f9d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-06-16 21:04:48 +02:00
Dimitrios Apostolou
fe0e87c9a6 Add ASAN build for qtbase
The test run is wrapped with a special TESTRUNNER script that ignores
failing tests (there are several tests failing when built with ASAN) and
also ignores LSAN errors (memory leaks - but still visible in the
output).

The test run only fails if a test reports ASAN errors or if it
crashes (or times out, which is like a crash caused by qtestlib's
watchdog timer).

Fixes: QTQAINFRA-5025
Change-Id: I861756ab49388ac4a52409d3a780684244e469b1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-15 23:58:16 +02:00
Kai Köhne
04cc705947 CMake: Fix typos
Found by codespell

Pick-to: 6.4
Change-Id: I4907e423b6b345acf82f2d7e0ed62479719d694e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-13 15:37:36 +02:00
Jani Heikkinen
0cbb471b1b Bump version to 6.5.0
Change-Id: I83a4f915a914bdc18f6706bb902f3e3b13da074f
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2022-06-06 13:23:59 +03:00
David Skoland
fd4f218c1e Expose the qtloader object globally
When testing, we need to query the state of the Qt application,
so change the scope of qtloader from inside the init function
to global scope.

Additionally, adjust the test script accordingly to query and use this
state to make good decisions on how to terminate.

Change-Id: I6264ba20843716eb87340b160680617b718f6bd9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-06-03 05:30:46 +02:00
Yuhang Zhao
42fe677584 Core: make CLDR data constexpr
Task-number: QTBUG-100485
Pick-to: 6.3 6.2
Change-Id: Ib8c5160ca0994662a5fdc2293dc734c1bdcac4f2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-27 09:33:28 +08:00
Yuhang Zhao
34c21d0407 Core: make Unicode Database constexpr
Task-number: QTBUG-100485
Pick-to: 6.3 6.2
Change-Id: I41480a34b14fd86a68a5c10b7e0f3d250e785d0f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-26 12:42:36 +08:00
Ievgenii Meshcheriakov
838a7a01f3 Unicode: Extract EastAsianWidth property
This property is needed to properly implement the line breaking
algorithm from UAX #14.

Task-number: QTBUG-97537
Pick-to: 6.3
Change-Id: Ia83cc553c9ef19fae33560721630849d2a95af84
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:43 +02:00
Ievgenii Meshcheriakov
1a26719c54 Unicode: Remove obsolete word break classes
Remove E_Base, Glue_After_Zwj, E_Base_GAZ, and E_Modifier obsoleted by
UTS #29, version 33 (Unicode 11.0.0).

Task-number: QTBUG-97537
Pick-to: 6.2 6.3
Change-Id: If5dc36ae17cd8746bbe81b73bbcc0863181e4a7a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:42 +02:00
Assam Boudjelthia
53604df833 Android: fix default name of the CI emulator
This name was changed in qt5/coin but wasn't reflected here. Currently,
things works correctly because the test target provide the correct name
as an env var.

Pick-to: 6.2 6.3
Change-Id: I8968285de2c7759d16f303c48d6295295dffbef6
Reviewed-by: Simo Fält <simo.falt@qt.io>
2022-05-19 15:43:38 +03:00
Luca Di Sera
e5a5c099af Add an exception in testrunner for QDoc
QDoc recently added some tests that use Catch2 instead of testlib.
Similarly to selftests, the normal behavior of `qt-testrunner.py` will
fail, trying to pass an argument that is not supported by Catch2 when
running the tests in CI.

To avoid the issue, an exception for the test executables that QDoc uses
was added to `qt-testrunner.py`, using the already available mechanism
that is used for selftests.

Change-Id: I5eb4b75f239eda0c493fb06ece164545d159372b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
2022-05-19 12:51:46 +02:00
Lucie Gérard
05fc3aef53 Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-05-16 16:37:38 +02:00
Thiago Macieira
3bcd6026ed util/x86simdgen: update with the copyright header
Matching update done in https://github.com/opendcdiag/opendcdiag/pull/78

Change-Id: I5ff8e16fcdcb4ffd9ab6fffd16ec02591cb5ed70
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-05-06 10:27:18 -07:00
Joerg Bornemann
6608e63298 Fix build of util/glgen
Don't use QSet::toList(), and fix an obvious typo.
Also, core5compat is now needed due to the use of QRegExp.

Change-Id: I766455996c07d354e97a4ed4939f1774fc449331
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-05-06 03:48:09 +02:00
Marc Mutz
dffca8bb0e Add a simple Qt 6/CMake-compatible script a la includemocs.py
Perl is dead and I don't speak Python, so if someone wants to port it,
be my guest. I needed something that I can use to roll out includemocs
across all Qt modules, and this is it. It works for me™, so I don't
expect to do much development with it.

This is an automated committer script I've been using so far:

    # SRCDIR=~~~
    # BUILDDIR=~~~~
    cd $BUILDDIR
    find */src -name mocs_compilation.cpp | while read FILE; do
        if grep -qsE '^#include' "$FILE"; then
            DIR="$(dirname "$FILE")"
            LIB="$(basename "$DIR")"
            case "$LIB" in
            Q*)
                LIB="${LIB%%_autogen}"
                ;;
            *)
                LIB="Qt${LIB%%_autogen}"
                ;;
            esac
            DIR="${DIR%/*}"
            path/to/includemocs6.sh "$SRCROOT/$DIR" "$DIR" "$FILE"
            (cd "$SRCROOT/$DIR" && git commit -am "$LIB: includemocs

$(cat "$SRCROOT/commit-msg.txt")" --no-edit)
        fi
    done

If the script cannot associate a moc file with a cpp file, it will
print a warning and continue.

The script tries to include the moc-file right after the
QT_END_NAMESPACE to work around many TUs ending in an #endif from some
#if QT_CONFIG or other. If there's no QT_END_NAMESPACE, it appends
the include and prints a warning.

Fixes: QTBUG-102886
Pick-to: 6.3 6.2
Change-Id: I16c5a9f845777ea2e82f15611b4fdd32f98ce0bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-05-05 04:26:19 +00:00
Dimitrios Apostolou
72793ef31d Generalize exclusion list
It seems there are some tests in the various Qt modules that skip
writing the XML testlog file. If there are good reasons for that (for
example test is a custom shellscript) then it should be added to the
DUMB_TESTS list.

Change-Id: Iffb00e1fda42bb8e7338a94c9320e45900db1bc1
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2022-04-22 15:39:03 +02:00
Dimitrios Apostolou
399dbba775 qt-testrunner: improve error logging
Do not print full stack traces when a controlled exception occurs,
instead print just the exception name and the message.

Change-Id: I5669862d2e98c550d88d1d11fb2bf49f197cfc17
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-04-22 15:38:59 +02:00
Joerg Bornemann
2c364aef4c Remove the qmake2cmake wrapper scripts and document where they are
Pick-to: 6.3
Change-Id: Ib36f4e614845a3b375f4a86239fa7e6e26d7adea
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-04-12 10:34:40 +02:00
Edward Welbourne
681bef22a7 Fix generation of qsimd_x86 files to require no hand-editing
Recent fixes to include the "We mean it" comment in the header also
lead to that comment appearing in the generated .cpp file, which also
lacked the "This is a generated file. DO NOT EDIT." comment. The
generated header also lacked a blank line after the "We mean it"
comment, so include that (and take it out, too, in the .cpp). The
"Please see" line of the "DO NOT EDIT" comment also used the name of
the generator script as seen from the Makefile that drives the
regeneration; replace this with the README.md file that actually
explains how to regenerate the files in corelib/global/.

This amends commit 71af0d7059
and commit b852584556

Change-Id: I4b5b4dbef5954819632bb625d1914a9ec46e15d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-07 23:04:04 +02:00
Dimitrios Apostolou
0b4446e16f qt-testrunner: be more strict if bad XML log files are written
If a test returns 0 but writes an XML logfile that contains FAIL or a
corrupted XML file, then qt-testrunner considers it a CRASH and exits
with 3.

Previously any test execution returning 0 (success) was considered
a PASS. Changing this behavior with this patch finds a lot of test
crashes on Android (QTBUG-100470), because the tests are run indirectly
on the emulator and the test wrapper process could not detect the crash,
thus returning 0 to qt-testrunner. But the corrupt XML file is caught
now.

Likewise, if a test returns != 0 but the XML logfile contains only PASS,
qt-testrunner considers it a FAIL. This used to be the case but now
tests are added.

Finally changed logging for such cases from INFO to WARNING.

Task-number: QTBUG-100470
Change-Id: I404c9d2211c7de027bf776d1914519d37f513ca1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-04-05 12:06:23 +03:00
David Skoland
b01ee1d44c Add WASM testrunner
Add a python script that allows us to run wasm tests in CI, along with
the necessary cmake logic to install the script and execute tests
accordingly.

Change-Id: I93b95c115538c4e27b2b833405acab8162be2a8a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-03-31 16:50:25 +02:00
Joerg Bornemann
bac56fd4d0 pro2cmake: Introduce qmake2cmake convenience scripts
Add qmake2cmake[.bat] wrapper scripts that can be used to convert user
projects to CMake.  For now, user projects are internally handled as Qt
examples with one difference: the generation of example-specific
installation code is suppressed.

Fixes: QTBUG-98655
Change-Id: I1a57f6d12efe0bdf383592ab33682a611692db80
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:30 +01:00
Joerg Bornemann
928828b549 pro2cmake: Handle QT_(MAJOR_|MINOR_|PATCH_)VERSION conditions
Task-number: QTBUG-98852
Change-Id: I4c86fff7bbcc6c42cd04094f2409c3d04779597c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:30 +01:00
Joerg Bornemann
0dc374c9d8 pro2cmake: Remove INSTALL_LOCATION from qt_add_qml_module calls
This function does not handle installation.

Change-Id: I02fdc244f49b5935aa1ac51bff8a25970ad3a335
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:30 +01:00
Joerg Bornemann
3954b7385e pro2cmake: Generate find_package call for Qt5/Qt6 for examples
This makes the QT_VERSION_(MAJOR|MINOR|PATH) variables available.

Task-number: QTBUG-98852
Change-Id: I7e40f2a7ac09975ce21e45cda384af928e1fa629
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:30 +01:00
Joerg Bornemann
eab2a57b37 pro2cmake: Handle optional Qt modules
...and write a separate find_package(Qt6 OPTIONAL_COMPONENTS Foo Bar)
call for those.

Task-number: QTBUG-96799
Change-Id: I3386487774c386edde6767dca92ce433bfed906e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:30 +01:00
Joerg Bornemann
50f3b1c519 pro2cmake: Add a blackbox test for converting from qmake to CMake
If you can set the environment variable DEBUG_PRO2CMAKE_TEST_CONVERSION
to 1, the output of pro2cmake is written to the temp directory.  This
helps analysing test failures.

Change-Id: Ida42c5b76a67172d00ce0d2488adc7fb376c6b11
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:30 +01:00
Joerg Bornemann
e60c41ac0a pro2cmake: Enable AUTOUIC only if the project has FORMS
Change-Id: I1bf232fa3c389eb86707d3af04de6cf9eb09451a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:29 +01:00
Joerg Bornemann
1c2f6d2ace pro2cmake: Write only one find_package call for Qt packages
Task-number: QTBUG-96799
Change-Id: I1eb8ac05f360b74e5ae1217b5535a33227b5084b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:29 +01:00
Joerg Bornemann
f5a8d70dee pro2cmake: Add LibraryMapping.components
LibraryMapping.components is a list that holds the sub-components of a
CMake package.  Before, we held this information in
LibraryMapping.extra as find_package argument.

A subsequent patch will make use of LibraryMapping.components and
doesn't have to do find_package argument parsing.

Change-Id: Ie0d317245fb6ec1511e06b2e14c364292fced63a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:29 +01:00
Joerg Bornemann
b28f436cd4 pro2cmake: Make generated examples use qt_add_qml_module()
We prefer it when the CMakeLists.txt project files for examples use
qt_add_qml_module() when adding resource files, rather than
qt6_add_resource().

A bit of refactoring was needed to re-use the code that extracts
resource information from the .pro file.

The new function write_qml_module is now responsible for writing
qt_add_qml_module calls.

Task-number: QTBUG-96799
Change-Id: I74dc2d681dcf4fc848e1147b3232ce9a9e0946c9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:29 +01:00