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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This function does not handle installation.
Change-Id: I02fdc244f49b5935aa1ac51bff8a25970ad3a335
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
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>
...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>
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>
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>
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>
This got lost in commit b852584556 .
Also augment util/x86simdgen/header so that the header is
automatically included when qsimd_x86_p.h is re-generated.
Change-Id: I3e59b983f78b8c1aced3757e1aa5dceb6d653d97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
And the target ZSTD::ZSTD to WrapZSTD::WrapZSTD.
This should allow building Qt with the
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON set.
Pick-to: 6.2 6.3
Fixes: QTBUG-100537
Change-Id: I748601e4ad6f518323bf1034d6fc1de582c815e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Mention that flake8 and black can be run via Makefile targets.
Remove the outdated list of flake8 warnings. The Makefile ignores more
warnings/errors, and it doesn't seem to be useful to duplicate this list
here.
Also remove the description of the black tool's arguments for the same
reason.
Change-Id: I941c3ab68b7a3d2477f7fbb5d28603987d0b2cab
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
For example projects, change the generated project() call to
project(foo VERSION 1.0 LANGUAGES CXX)
Some CMake API derives default values from the project version, and it's
generally advisable to set a project version number.
The version number is read from qmake's VERSION variable. That's
actually a target version number, but it might be the right thing in
most cases. Fall back to version 1.0 if VERSION is not set.
Task-number: QTBUG-96799
Change-Id: Ia0c551cf62621eb217e1dd541dcbd8945f78138e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Unfortunately qmake does not have operator precedence in conditions,
and each sub-expression is simply evaluated left to right.
So c1|c2:c3 is evaluated as (c1|c2):c3 and not c1|(c2:c3). To handle
that in pro2cmake, wrap each condition sub-expression in parentheses.
It's ugly, but there doesn't seem to be another way of handling it,
because SymPy uses Python operator precedence for condition operators,
and it's not possible to change the precendece.
Fixes: QTBUG-78929
Change-Id: I6ab767c4243e3f2d0fea1c36cd004409faba3a53
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Change the expected value from None to [], because that's the value of
the if branch. It has been like that since v6.0.0 at least.
Change-Id: Iefdb22a772fc5540ad5a38566be5a7f529e00cb1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If the flavors argument is an empty list, this function becomes the
identity function.
Change-Id: I534df079578ff27d24ae15760ea12464e3961f93
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When the android-embedded scope was removed in
7a4b586f4b, the conditions in
test_scope_handling.py were adjusted following the laws of logic.
However, the scope handling code does not follow the same laws.
Effectively revert the part of said commit in test_scope_handling.py but
use "UNKNOWN_PLATFORM" instead of "ANDROID_EMBEDDED".
Change-Id: Ic090451e2a28b50f5be5668503e216cbe3871633
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
...to have a consistent baseline for further improvements.
Change-Id: Iba8e83a7a5cf5ca0cdf509f79e7d2dc2d8f42fec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Since it's a private header, qglobal_p.h makes sense.
Change-Id: Ibf4acec0f166495998f7fffd16d5d8a38ee8f1f8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This program was replaced by psl-make-dafsa.
Task-number: QTBUG-95889
Change-Id: If52d92734ad362364c6250473281886e1ea5545d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
__attribute__((target("arch=xxxx"))) does not work because the compilers
(GCC at least) don't test the CPU features that they are targeting, so
we keep getting "inline failed" compiler errors.
GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90129
Upstream patch: https://github.com/opendcdiag/opendcdiag/pull/59
Change-Id: I6fcda969a9e9427198bffffd16cea09fda4406d2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
I'd been making changes to that and improving it for the past 2 years
without bringing it back into Qt.
The list of features is mostly the same, except:
- removed TSX features
- removed features specific to Xeon Phi processors
- added CET and AVX512FP16 features
- added the bit for hybrid CPU detection
See matching update at https://github.com/opendcdiag/opendcdiag/pull/49
Change-Id: I6fcda969a9e9427198bffffd16ce860b5a38aece
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
QNX requires its own TESTRUNNER script in order to SSH to the QEMU guest
and run the tests. Simplify it a lot and fix the way it passes arguments
so that they retain spaces and quotation.
Also wrap it with the generic TESTRUNNER script for CI, which is
qt-testrunner.py, so that tests can re-run in case of flakiness.
Delete prefix.sh as the environment variables are now properly set in
the Coin platform config files.
Avoid executing extra chmod commands to make scripts executable,
but use the right Coin instruction for that. For reference, we
use 493 for file mode which equals to 755 in octal, as Coin expects
the file mode in decimal.
Change-Id: Ife4d1caef606f48b92ba1da1cfb14ec0dea11ef2
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
Previously the qt-testrunner script was avoiding to write XML log files
for the flaky test re-runs, since parsing them always provides limited
information about what went wrong (for example unparseable files) and
might miss issues completely (for example a crashed test might not even
write a log file), or even mislead if multiple different data points
about a single testcase end up into the database..
But currently Coin is the system that uploads test information to the
testresults database and expects to find such log files in an attempt to
send as much information as possible regarding failures.
Re-enabling these log files will allow Coin to deduce as much
information as possible about the test runs.
This is a temporary step at least, until the test-uploading logic is
separated from Coin. Then it will be easier to find the full information
about what happened with flaky or crashed tests by special logs from
qt-testrunner.py, which is the test re-running orchestrator and
therefore has more knowledge about what went wrong.
Fixes: QTQAINFRA-4754
Change-Id: I69e4469cbe6c0a6ca5b2473eaf8d034632564342
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
Some function names are special for qtestlib, in the sense that they can
not be specified as a command line argument to run individually.
In such cases qt-testrunner treats the failure specially and tries once
to re-run the full test executable.
Fixes: QTBUG-89011
Change-Id: I0cc25f91c57374e5ac65ade10e2e223fe969f211
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
To tool generates calls to qt6_add_resources instead, and we don't want
to promote the usage of CMAKE_AUTORCC.
Task-number: QTBUG-87643
Change-Id: I58458416514949a6ffc9b93c7eb6d24bc2ed01ca
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The pyparsing module's debug action properties have been renamed.
Check the existence of the attributes before assigning.
Change-Id: I8fff652304a0af215c56f54b63d613a1f6a5207a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The public suffix list scanner's utf8encode()'s main loop always
worked out whether a character is a hex digit, even when it didn't
need to know. Package the computation in a lambda and only test it
when it is needed. Also assert non-empty input generates non-empty
output.
Change-Id: Iaf48aad382624e421cea9c9cdb8bba5fc47b1596
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
It causes crashes because of interleaved execution of Quick tests.
Task-number: QTBUG-98350
Change-Id: I61e26f5da5617e06810db8eb7991f17eecdd3acb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>