Previously we used sh $* for passing parameters of various calls like
cmake / configure. This did not properly preserve quoted arguments,
leading to potential issues.
For example when configuring qtbase with
cmake -DQT_QMAKE_DEVICE_OPTIONS="DISTRO_OPTS=hard-float boot2qt"
the 'boot2qt' option would be passed as a separate argument to cmake,
leading to the QT_QMAKE_DEVICE_OPTIONS cache var containing only
'DISTRO_OPTS=hard-float'.
Use "$@" to preserve the quotes.
Inspired by
https://wiki.bash-hackers.org/scripting/posparams#all_positional_parameters
Amends e9b8837c31
Pick-to: 6.2 6.3
Change-Id: Ib67d4bc138c65f7430457cb2a2baa55bff72e549
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
There seems to be lot of timeouts on testing where qemu is not able to
start at current 60 seconds period.
Pick-to: 6.2 6.3
Change-Id: Icbc47b75a8288e672237789cb273ef5a644c08ba
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
We set the default verbosity of configure output to NOTICE in
regular Qt builds.
To preserve the STATUS verbosity in CI runs, we now pass it
explicitly when configuring all repos / tests.
Pick-to: 6.2 6.3
Change-Id: Ib63739c05855cfd5951d38ce3f8a7fc8d1218cd3
Reviewed-by: Alexey Edelev <alexey.edelev@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>
Use CMAKE_STAGING_PREFIX instead of CMAKE_INSTALL_PREFIX when
cross-compiling. This separates the host path used in staging
prefix and the target path used in the install prefix for the
device. This prevents for example Windows paths from being used
in a device that does not support those. It also tells qmake
not to sysrootify paths when building with it.
Embedded linux and QNX builds are mostly affected and need this
to use correct RPATHs and to unsysrootify qmake. Mobile platforms
(Android and iOS) are not affected since they package binaries
separately. WASM and INTEGRITY are static builds and device paths
are not used.
Cross-compiled auto tests keep staging prefix in RPATHs due to
the behavior implemented in commit 20292250d4
which keeps the QEMU test runs working as before.
Pick-to: 6.3 6.2
Change-Id: If464ccd8cd9318a853df9afcb2aa709fbb2c1837
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
As a drive-by this fixes the qtbase build to also have the
CMAKE_AUTOGEN_VERBOSE option set.
Pick-to: 6.2 6.3
Change-Id: I32324fb1e8e16299c5f34517edbc7ff335d84e14
Reviewed-by: Toni Saario <toni.saario@qt.io>
It had been noticed that sometimes the Android emulator in our CI took
several minutes to fully boot. It turns out that this behavior can be
reproduced locally by removing the image files under $HOME/.android
especially the "userdata-qemu.img.qcow2" file.
Then the emulator goes through several reboots until fully booted with a
full set of packages installed. We discovered that the property that
signifies it is finished is dev.bootcomplete=1. So we now check for this
flag and remove the other heuristics we had.
We also disable the debug output to avoid hundreds lines of
logs. Instead we selectively print the values that the emulator returns,
every second until full boot is detected.
We increase the Coin timeout for the shell script, from 5min to 10min,
since it has been measured that it takes about 2.5min on a good day, and
the script itself retries several times to restart the emulator in case
of failure.
Finally we adjust the coding style a bit to be more consistent.
Pick-to: 6.3 6.2
Fixes: QTQAINFRA-4681
Change-Id: I77062dceb91477e957696c89bfacb4ebabc34c1f
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Script that wraps Qt test execution in order to iron-out flakiness.
Task-number: QTBUG-96353
Change-Id: Ie8ee780e3f4f8d086c080a7784f9f68fd1867be2
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
Was likely an oversight.
Amends 9f559699cc
Pick-to: 6.2 6.3
Change-Id: I13c2e4cc32e68c1ce98f59a932e3448250b0679b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Hostname is already set in options file, lets use that instead of
setting it again manually.
Task-number: QTBUG-99168
Pick-to: 6.2 6.3
Change-Id: I31c42a597ff45a94a2e36aa6f5002d171ad448ee
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Currently only qtbase is being run Qt autotests
Task-number: QTBUG-99168
Pick-to: 6.2 6.3
Change-Id: Ib9678c937c91946f07b78f8141df4837fa5d4111
Reviewed-by: Toni Saario <toni.saario@qt.io>
- there is no possibilities for running autotests on CI
Pick-to: 6.2
Change-Id: I15f0c600172ec4962edf3716a651483982c4f8c6
Reviewed-by: Toni Saario <toni.saario@qt.io>
Bic tests do not work due to bic tests being broken.
A feature enables easier testing of the bic tests.
Change-Id: I15b400ee8f0f877ac2c6c71fc50d51c5e11b330d
(cherry picked from commit 31910cbc09ff219b332aac94afe78c99d34274b3)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
MSVC2022_PREVIEW can be removed later when MSVC2022 official
release has been merged
Task-number: QTQAINFRA-4540
Pick-to: 6.2
Change-Id: I7756b53b1cd5863d21c1c1e3bb19373f6f0cf8fa
Reviewed-by: Ville-Pekka Karhu <ville-pekka.karhu@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
The actual module build is done in-tree and after this attempting
to do shadow build of the dirty source directory causes issues in
some modules.
Pick-to: 6.2
Change-Id: I74bca186b238c5c1f10576b4f821efdf66b827ed
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Allows us to remove redundant information in the platform configs.
Pick-to: 6.2 5.15
Change-Id: Id0c09ce6f22f3bd52ef426c14a1b2806559b2321
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Script used to parse env variables and run test over ssh on qemu
* Script to start qnx qemu
* Script used to set env variables for ssh so they are correct in qemu
* Add b2qt sdk host toolchain to path for actual qemu binaries
Task-number: QTBUG-87628
Pick-to: 6.2
Change-Id: I951172211c2963654899491568771310a410e616
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
A single configuration provides qdoc and qtattributionsscanner via
provisioning. The environment variables instruct QDoc to run in
testing mode; it ignores linking warnings (since we don't have .index
files for external documentation modules) and terminates with non-zero
exit code if documentation warnings exceed the limit set in the
documentation config.
The provisioned binaries are portable, packaged together with their
dependencies. As they are installed under /opt, the instructions
create symlinks to the binaries in the install directory before
building the 'generate_docs' target.
Pick-to: 6.2
Task-number: QTBUG-78069
Fixes: QTBUG-95554
Change-Id: I4a4765250247e2fc6eddd153c36cf8126ddd10ae
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
When official version is available variableValue path need to be
changed.
Task-number: QTQAINFRA-4540
Change-Id: Ie5fe676962297aa5f18f225eb4b8dfe0957671c8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This reverts commit c7ddaa9f58.
Reason for revert: Broke integrations
Change-Id: I21ffb3b16e361a48a5d9b7a528d150e51519623c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The JUnit format is easier to feed to tools that don't support
the native Qt Test XML format.
Pick-to: 6.2
Change-Id: Iad677b98953275fd70765acb039f1fb3d0f44dab
Reviewed-by: Simo Fält <simo.falt@qt.io>
Enable building and uploading test artefacts for all modules in case
tests are enabled.
Pick-to: 6.2
Task-number: QTBUG-88846
Change-Id: I30832820dea348187b517e170fa1c5266db85604
Reviewed-by: Toni Saario <toni.saario@qt.io>
Add infrastructure to build cmake auto tests in the CI when targeting
iOS.
Currently the are only CI instructions for qtbase.
More work is needed to make it work for other repos.
With this change, we will build a single Widgets application targeting
the iOS simulator. We can't target the device SDK in the CI because
signing fails due to a missing signing certificate and provisioning
profile.
The Coin instructions will now set a QT_BUILD_ENVIRONMENT=ci env var
whose value will be checked in _qt_internal_test_expect_pass, to
ensure we build for the simulator SDK when using a universal Qt.
Without this, xcodebuild will try to build with the device SDK and
fail to build the project.
Pick-to: 6.2
Task-number: QTBUG-95839
Change-Id: Ib39c9527b107b2004746ccbdc9d9d1d658f88c76
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Change-Id: I22617a5f7b8971eae679058feaf41ba811e0a3dd
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Change adds coin_ctest_runner.py which is used to pass test arguments
for testcase. Results are stored to xml files, which are then parsed by
COIN. Data that we are interested in, is injected to influx db.
Task-number: COIN-643
Change-Id: Ib1c99fc8aacc6a6b5863d282f3435fe1cfdcd013
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If these values already exist do not add them to configure. This also
allows setting these values from platform configurations
Change-Id: I2f2aea90d91fa3436953e0c4103f0ea204b3564b
Reviewed-by: Toni Saario <toni.saario@qt.io>
The Android test VMs take almost the same amount of time of that set to
the test timeout, this is causing it to be killed by COIN in some cases.
This is for example a stat from a successful test instance:
Total Test time (real) = 7110.20 sec
It's very close to 7200 which is the timeout value. The VM is taking
that long because the tests are only half built, the projects' shared
libs are built during the Build step of the integration, and the actual
apk (Gradle build) is done later when doing a ninja tst_name_check.
This latter behavior should be changed so that the apks are built before
going to testing.
So it makes sense for now to increase the timeout and avoid having to
restage multiple times.
Task-number: QTBUG-94127
Change-Id: I31783bcc1255c7821134e174ab6b0fb199000272
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
This allows modules to set custom timeouts for the builds.
Works by modules setting the CMAKE_BUILD_TIMEOUT and
CMAKE_BUILD_OUTPUT_TIMEOUT in the module's module_config.
Change-Id: I6f0170d77e9a962fb37e171d1c0d8c7b2277bb96
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Rather than using multiple layers of negation, we can just specify a
list of allowed configs.
Allow cross-building other repos when targeting WebAssembly.
Be explicit about not building Android tests for repos other than
qtbase (until that is not longer desired).
Currently the qt5 platform configuration only has qtbase marked
with the AndroidTestRun feature.
Amends fd16c65b7e
Amends 13c460d0ff
Superseeds 60a5b7be03f5800caa8a117c3b07b60d8fb208ec
Change-Id: If8de002e0c9f748b43e3d2271ac283462603b2e6
Reviewed-by: Toni Saario <toni.saario@qt.io>
Add new configure option -make minimal-static-tests and CMake option
QT_BUILD_MINIMAL_STATIC_TESTS. In conjunction with QT_BUILD_TESTS
it will enable building a minimal subset of tests when targeting
a static desktop Qt build.
In qtbase the minimal subset includes all the auto tests of testlib,
tools, corelib and cmake. In particular this will also do cmake build
tests and qmake build tests (tst_qmake)
Adjust CI instructions to enable building a minimal subset of static
tests when a platform configuration is tagged with the
MinimalStaticTests feature.
Fix and skip a few tests that were failing.
Pick-to: 6.1
Task-number: QTBUG-87580
Task-number: QTBUG-91869
Change-Id: I1fc311b8d5e743ccf05047fb9a7fdb813a645206
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This patch enables per module control of the build instructions.
This enables documentation building in modules that are not capable
of building the module itself on linux.
Change-Id: I72b7931c5ffda9bf437a99c27c0bb340665ce927
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
If we skip module build the CMakeCache.txt does not exist.
Change-Id: Ic44bddf29f1eef1e6ffc568c871d9d7e7de71f48
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
We had two workarounds:
* script that adds Gui to tests
* create a symbolic link for the qt install dir to fake_prefix which
androiddelployqt was expecting them to be under
Both issues are fixed, thus removing the workarounds.
Pick-to: 6.1 6.0
Change-Id: Ic022bece15afe92c693d573893d260b13b4227ed
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
The scripts that are used by Android test VMs are now located in qtbase
and are not easily usable by other modules. To fix that and allow other
modules to use those scripts, we install them with cmake into libexec.
Task-number: QTQAINFRA-4052
Pick-to: 6.0
Change-Id: Ibdd3658fd9fe7e007104a85d9999028a2de99a33
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We want to remove the Qt .pro files for projects, except examples,
because examples are still meant to build with qmake.
To not lose coverage on examples built with qmake, add instructions that
will build the qtrepo/examples folder with qmake when the CMake
configuration has -DQT_BUILD_EXAMPLES=ON.
This means that such configurations will build examples both with CMake
and qmake.
Aside from making sure that our examples will still build with qmake, it
will gives us some some coverage that a CMake-built qmake works
correctly.
Implementation-wise, add new instructions files that can call qmake and
make depending on configuration and target type.
Pick-to: 6.0
Fixes: QTBUG-85986
Change-Id: Ie8f4cbcda03c94da2aef455e32f48dad41a4bdb0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This enables documentation building in add-ons and other modules that
need to build docs.
Task-number: QTQAINFRA-3972
Change-Id: Ic2763d6d36d26e5a1267b312727c3c268ad6d114
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e84e85dd4c59f2c79f81ba4d8d7f04397eb0003c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For consistency, apply the following renamings:
QT_NO_MAKE_EXAMPLES -> QT_BUILD_EXAMPLES_BY_DEFAULT
QT_NO_MAKE_TESTS -> QT_BUILD_TESTS_BY_DEFAULT
QT_NO_MAKE_TOOLS -> QT_BUILD_TOOLS_BY_DEFAULT
BUILD_EXAMPLES -> QT_BUILD_EXAMPLES
BUILD_TESTING -> QT_BUILD_TESTS
This should help to better convey the difference between "BUILD" and
"NO_MAKE".
To configure tests, but not to build them by default, pass the
following to CMake:
-DQT_BUILD_TESTS=ON -DQT_BUILD_TESTS_BY_DEFAULT=OFF
Analoguous for examples:
-DQT_BUILD_EXAMPLES=ON -DQT_BUILD_EXAMPLES_BY_DEFAULT=OFF
Tools can be excluded from the default build with:
-DBUILD_TOOLS_BY_DEFAULT=OFF
The variable BUILD_TESTING is still available and initialized with the
value of QT_BUILD_TESTS.
Pick-to: 6.0 6.0.0
Change-Id: Ie5f29dfbdca8bfa8d687981dfe8c19c0397ca080
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This is meant to be called by our CI instructions to build standalone
tests of a Qt repository.
Currently it just calls qt-cmake with
-DQT_BUILD_STANDALONE_TESTS=ON, but it might contain more things in
the future.
The script also simplifies configuring standalone tests locally, due
to not having to remember the name of the magical variable.
Change our CI instructions to use the new script.
Change-Id: I6bc02b4e94adc9d0d05fecb0fe70a561043271f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
qmake sees the QMAKESPEC variable and uses it when building tests,
instead of using the target mkspec written in the target_qt.conf file
by the build system. Unset the environment variable to force usage
of the mkspec specified when confugring Qt.
Task-number: QTBUG-86053
Change-Id: I24ceddd1436393b496665e439dd1441ecbd36df7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Current clause is too broad and new compilers do not work with it
properly. E.g. Clang.
Change-Id: I7afadfec07935e76882d27ec7ab408b0e597654b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reading configure arguments for tests from environment allows control
of CMake args from outside of the module itself. TEST_CONFIGURE_ARGS is
read and appended to host tests build and TARGET_TEST_CONFIGURE_ARGS
respectively for target's tests.
Change-Id: I8270b0254525aec24f7614cba2b90b291e5eb3d2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
On regular commits we do not want to waste time running all test if
there is failures.
Change-Id: I050d191058293f4311268169eb26754349930129
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
In qmake builds we can see the moc invocations, whereas in CMake builds
by default we don't.
Modify the Coin instructions to pass the CMAKE_AUTOGEN_VERBOSE cache
variable so that AUTOMOC prints the moc invocations.
Change-Id: I50be13224839fbbdece3c9e8a4935a72aba91a8e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
We don't want to build the host Qt configuration every single time we
do a cross-build in Coin.
Coin learned some new qt5.git platform configuration options, which
allow specifying a dependency between a host Coin configuration and a
target one.
This means we can specify a host macOS config as a dependency when
building iOS, and the host artifacts for all dependent repos
(qtbase, qtsvg, qtdeclarative, etc) will be installed into
/home/qt/work/install (as specified by the
{{.AgentWorkingDir}}/install location).
Same for Linux + Android and Linux + qemu.
Modify the qtbase Coin instructions to use these installed host
artifacts if such a dependency is present (platformDependency is not
null). The target artifacts will be installed into a subfolder of the
host installation, called 'target', e.g. /home/qt/work/install/target.
If a dependency is not present, continue to build a host Qt before
doing a target build. This allows gradual conversion of configurations
in case if some of them don't work, or if the dependencies.yaml have
not propagated far enough for all new repos to use the new
instructions.
In this case the locations of the artifacts are different
host - /home/qt/work/install/host
target - /home/qt/work/install/target
Task-number: QTBUG-85623
Change-Id: I33539f4376034539fb7db80293dc4d39dcb9539b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Currently configure arguments specified in
qt5.git/coin/platform_configs are only used when configuring
qtbase itself. Sadly, Coin lacks support for specifying per-repo
configure flags.
Until Coin gets the feature, the best we can do is to pass
all the configure flags to each repo we are configuring.
Unfortunately if we pass all of qtbase's configure flags to other
repos it will break cross-compiling configurations (because the
toolchain argument would be overridden with the initial qtbase
provided toolchain instead of the Qt generated chainloading one).
We thus have to separate flags that should and shouldn't be passed
to other repos.
Introduce usage of two new environment variables called
NON_QTBASE_CONFIGURE_ARGS and NON_QTBASE_TARGET_CONFIGURE_ARGS.
Additional configure arguments can be specified in these variables,
and they will be used when configuring repositories, with the
exception of qtbase.
Ultimately, this is needed to disable detection / usage of certain
strawberry perl system libraries in qtimageformats on MinGW.
Doing that prevents crashes of the tst_qtiff test.
Minor implementation note is that the environment variables have to be
explicitly set in qt5.git platform_configs otherwise it breaks the
Windows Ninja Multi-Config configuration with the error
"The system cannot find the file specified".
Supplements 4b4f0be08debcfde62caf4066222b348ce65dea1 from qt5.git.
Amends previous revert 946fc92d20
Task-number: QTBUG-84886
Task-number: COIN-601
Change-Id: Ie4305c5d799bf4a29da5032a691e797b49c3cf33
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This reverts commit adbadc57df.
The change breaks building of repos other than qtbase when
cross-compiling to Android. Not sure yet why.
Change-Id: I6a6efef5360ed141c0c5056afb03b1a0d90439ae
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Currently the configure arguments specified in qt5.git/coin are only
used when building qtbase itself. None of them are used when
configuring other repos like qtsvg.
While in principle passing all the configure arguments to other repos
is not a good thing, we need to do it to circumvent the lack of
support for specifying per-repo configure flags in Coin.
It's needed to disable detection / usage of certain strawberry perl
system libraries in qtimageformats on MinGW. Doing that prevents
crashes of the tst_qtiff test.
Supplements 4b4f0be08debcfde62caf4066222b348ce65dea1 from qt5.git.
Task-number: QTBUG-84886
Task-number: COIN-601
Change-Id: I59be8c62ebb10282db1b0a9da2d3e3e5595c925f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The test runner re-runs failing tests up to 5 times. We did not do this
for the CMake build, and now we're getting lots of flaky tests failing.
Fix this by passing the -repeat until-pass:5 parameter to ctest.
Change-Id: I6ff3c1e7901bc22cafec87b15d087eab2a565c65
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Create a new test instructions yaml template that does not ignore the
exit code of running tests. This template can be included by
repositories where tests pass in all configurations tested by the CI.
The template should be included in module_config.yaml via
Test:
- !include "{{qt/qtbase}}/coin_module_test_template_v3.yaml"
This allows us to opt into enforcing test runs per repository,
rather than waiting to fix all tests in all qt5.git repositories.
Implementation notes
Try to extract the common parts of the instructions as much as
possible to avoid duplication. Unfortunately some duplication still
remains due to the restricted yaml language supported by Coin.
Add a short README.md file that describes the differences between the
existing templates.
The v2 non-enforcing test template should probably be removed in
the future.
Task-number: QTBUG-84886
Task-number: QTBUG-85364
Change-Id: I718fc3cb44d6aefdbebc2fd2088a910a8095a375
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Skip crashing tests and ignore failing tests on CMake platforms.
Add missing QTEST_ENVIRONMENT=ci env var assignment to Coin test
instructions. This was hardcoded by the Coin code for qmake
configurations.
Task-number: QTBUG-85364
Change-Id: Id2312e504a0d36b8f8596d4cebaa49c63731406e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
We don't really know why, but using the ctest
--force-new-ctest-process flag stops the test from hanging.
Also re-enable the test.
Task-number: QTBUG-78449
Task-number: QTBUG-81365
Change-Id: I33094696dfe3f610dc257089074b1c2a9926f651
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Tests like tst_qmake need the build environment to be able to build
apps / libraries. This is mostly needed for MSVC.
Set the TESTS_ENV_PREFIX env var to point to the proper prefix.bat
(host or target) and use that when running ctest.
Task-number: QTBUG-85240
Task-number: QTBUG-78449
Task-number: QTBUG-81365
Change-Id: I6fa68714202ac7fc703973fc772e03b84790a043
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Before this change, tests were never built for cross-compiling
configurations.
Add instructions that build and run tests for qemu configurations.
This required a bit of abstraction / indirection to find out what's
the path to the correct qt-cmake call, as well as prepending the
correct env prefix to each call (either the host one or the target
one).
Also, the QEMU configuration requires a few environment variables
to pick up the correct runtime linker and which qpa plugin to use
for running tests.
Finally, make sure the tests are not built and run if the DisableTests
feature is set in the configuration.
Task-number: QTBUG-84423
Change-Id: I0cec28c801a657e67cfa48f3c61cfe487109946b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
If we configure qtbase with Ninja Multi-Config, we should use the same
generator when building other repositories as well, to ensure that
all repositories have the same set of configurations (debug and
release). To do that, the Coin instructions will call the
qt-cmake-private wrapper which records the generator used.
For standalone tests continue to use qt-cmake, so that only a single
configuration is built (no need to build tests in both debug and
release mode). The configuration built will be the first one from
the initial list with which qtbase was configured (usually
RelWithDebiInfo). This is ensured by the
QtBuildInternalsExtraConfig.cmake file.
Task-number: QTBUG-80900
Change-Id: I701b2f652a22d51e640a6fdf19c3b2d2dfb34d5c
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Calling cmake --install . only installs a single configuration.
To install both debug and release artifacts, the install
invocation needs to be done for each configuration.
To keep the Coin instruction code simpler, delegate the looping
over configurations to a custom CMake script, and use it in the
Coin instructions.
Replace all cmake --install calls in the instructions with calls
to either call_host_install.yaml or call_target_install.yaml.
The path to the script depends on whether we are building
qtbase or another module. In the former case the script should
be called from the build dir, otherwise from the install dir.
The other distinction is whether the host or target env prefix
needs to be added.
Task-number: QTBUG-80900
Change-Id: Ied4bf739e2b1a2307f22fc79c1cfad746c8cbc44
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Don't do any of the MSVC-related instructions when targeting MinGW.
Make sure to pass gcc and g++ as compilers when targeting MinGW.
Don't use any ENV_PREFIX that sets up the MSVC environment.
Task-number: QTBUG-75578
Change-Id: Icf5c39b58391d473d914fe8dc17d062812b07df1
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Using an environment prefix wrapper shell script that sources the SDK's
env setup. The script also ensure that we don't loose cmake on the way.
Change-Id: I9d08bc58f0efaf688512ab26a7ddb800309a5015
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When building for qemu, the target "os" is still set to Linux, so try to
detect qemu by looking at the version field.
Change-Id: I7c66cdb29a47a44d5b8a394977136139fc646155
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The friendly named values should be used rather than the
all caps names.
Change-Id: I44dbe8c25d405424c5cd2c9527b6e884511ac269
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
To allow seeing the exact compiler flags when build in Coin.
We do the same for qmake builds.
Change-Id: I8c43f35b95d722d914aaeaa8860720a3a0578737
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Due to a bug in upstream CMake regarding relative paths being encoded
into the build.ninja file when performing in source builds, we need to
build the tests in a standalone directory outside of the source
directory.
Failing to do so will cause the source directory for the test to be
incorrect which can cause tests to fails and never read the
BLACKLIST.txt file. See the mentioned issue for details.
Task-number: QTBUG-82820
Change-Id: Ie5c178a92369d6b9decff625bd9641e53088a9fa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Change-Id: Id274bf821f424077e7259ed42433f2ef88153c36
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Make sure to split the command arguments after variable substitution
like it is done in call_cmake.yaml.
Amends d445112cc0
Change-Id: Id23fcfa5b58c33e05495413fb10349fbcff1bfac
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This allows doing debug_and_release builds with Ninja on all
platforms.
The "Ninja Multi-Config generator" is available starting with CMake
3.17.
Desired configurations can be set via CMAKE_CONFIGURATION_TYPES.
Possible values: "Release, Debug, RelWithDebInfo, MinRelSize".
For example -DCMAKE_CONFIGURATION_TYPES="Release;Debug".
The first configuration is the 'default' configuration which is
built when calling ninja with no arguments.
To build all targets of a certain configuration use "ninja all:Release"
or "ninja all:Debug".
To build all targets in all configurations use "ninja all:all".
Note that the first configuration influences which configuration of
tools will be used when building the libraries for all configurations.
In simple terms, when configured with
-DCMAKE_CONFIGURATION_TYPES="Release;Debug" the release version of moc
is used by AUTOMOC.
When configured with -DCMAKE_CONFIGURATION_TYPES="Debug;Release"
the debug version of moc is used by AUTOMOC.
Framework builds and Ninja Multi-Config don't currently work together
due to multiple bugs in CMake, which ends up generating an invalid ninja
file with duplicate rules. There are also issues with placement of the
debug artifacts.
This will be handled in a follow up patch after CMake is fixed.
Task-number: QTBUG-76899
Change-Id: If224adc0b71b7d1d6606738101536146aa866cd7
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Previously repo/tests/CMakeLists.txt was a standalone project on which
CMake could be called. This was useful for Coin to be able to build
and package only tests, but was a bit troublesome because that means
having to specify the usual boilerplate like minimum CMake version,
which packages to find in every tests.pro project.
Instead of having a separate standalone project, modify the top level
project and associated CMake code to allow passing a special
QT_BUILD_STANDALONE_TESTS variable, which causes the top level project
to build only tests, and find Qt in the previously installed qt
location.
This also means that when building a repo, we generate a
${repo_name}TestsConfig.cmake file which does find_package on all the
modules that have been built as part of that repo. So that when
standalone tests bare built for that repo, the modules are
automatically found.
qt_set_up_standalone_tests_build() is modified to be a no-op because
it is not needed anymore. Its usage should be removed from all the
other repos, and then removed from qtbase.
Non-adjusted tests/CMakeLists.txt projects in other repositories
should still be buildable with the current code, until they are updated
to the new format.
Adjust the Coin build instructions to build the standalone tests in a
separate directory.
Adjust pro2cmake to generate new structure for the tests/tests.pro
projects.
Adjust the qtbase tests project.
Fixes: QTBUG-79239
Change-Id: Ib4b66bc772d8876cdcbae1e90ce5a5a5234fa675
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Change-Id: I3906a08f5e0cce9abeeafbb67a83d31fbf67c703
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
There are things that could be shared around all Qt submodules. In particular
compiler specific configuration should not be repeated over and over.
The new file can be included directly from all modules that uses QtBase.
In longer term one would have a separate repository for such instructions as
most of them are not QtBase specific.
Change-Id: I0590b2a0c78b73e1b9dbb27cc1da6568cbe56563
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>