qt5base-lts/tests
Alexandru Croitor c7fd10a022 Allow building the tests directory as a standalone CMake project
At the moment, Coin builds tests as a separate qmake invocation
against an installed Qt. We need to support the same with CMake.

Change the tests subdirectory to be a standalone CMake project when
CMake does not detect an existing QtTest target while processing the
subdirectory. If the target exists, it means we are building the whole
repo, if the target does not exist, we need to call find_package
to find the installed Qt.

Refactor and move around a few things to make standalone tests build
successfully:
- add a new macro to set up paths to find QtSetup
- add a new macro to find all macOS frameworks
- add a new macro to set up building tests
- add a new macro that actually builds the tests
- export the INSTALL_CMAKE_NAMESPACE value into the BuildInternals
  Config file
- export the CMAKE_BUILD_TYPE value, because a test project doesn't
  have a .git subdir and thus defaults to be built in Release
  mode, even though qtbase might have been built in Debug, so to
  avoid the mixing, the propagate the build type
- stop overriding INSTALL_CMAKE_NAMESPACE and
  QT_CMAKE_EXPORT_NAMESPACE inside QtSetup if they are set, because
  the tests project doesn't specify a major version, and if we
  override the values, the moc / uic targets don't get the correct
  major version prefix and configuration fails

Change-Id: Ibdb03687302567fe325a15f6d1cb922c76240675
Fixes: QTBUG-75090
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-22 11:12:54 +00:00
..
auto Don't link against dbus-1_nolink when dbus_linked feature is off 2019-05-08 12:32:53 +00:00
baselineserver Do not mix QByteArray with QString in arithmetic 2019-03-08 14:20:54 +00:00
benchmarks Merge commit 'dev' into 'wip/cmake-merge' 2019-04-16 16:32:08 +02:00
global
libfuzzer Improve project files of libfuzzer tests 2019-03-13 11:18:40 +00:00
manual Merge commit 'dev' into 'wip/cmake-merge' 2019-04-16 16:32:08 +02:00
shared tst_qfileinfo: Refactor ntfsJunctionPointsAndSymlinks() 2018-09-30 09:59:09 +00:00
testserver Convert tst_QSslSocket to work with Docker 2019-03-11 15:38:58 +00:00
CMakeLists.txt Allow building the tests directory as a standalone CMake project 2019-05-22 11:12:54 +00:00
README
tests.pro Build examples and tests only if their requirements are met 2017-03-22 15:55:55 +00:00

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.