diff options
author | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2019-02-12 16:20:36 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-03-22 15:55:18 +0000 |
commit | e8bde992e073072e795cdb2d4fa5d36089953645 (patch) | |
tree | 219450d93c193d92bfa7dfd8cddf955babb43f56 | |
parent | Clang: use -Oz instead of -O1 to optimize for size (diff) | |
download | qtbase-e8bde992e073072e795cdb2d4fa5d36089953645.tar.xz qtbase-e8bde992e073072e795cdb2d4fa5d36089953645.zip |
Update handling of TESTSERVER_COMPOSE_FILE
Initially TESTSERVER_COMPOSE_FILE could be manually specified.
Later this got removed by accident. Re-enable this feature.
Furthermore, check if a module has a platform-specific compose file. If
not, fall back to a default docker-compose.yml. This is useful to
include testserver.pri from other modules, where no platform-specific
requirements are present, ie the image from provisioning works on all
platforms.
Change-Id: Icb92552fd61196be332b2431ab0f8a43b9157fc8
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
-rw-r--r-- | tests/auto/testserver.pri | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/testserver.pri b/tests/auto/testserver.pri index eb83c6c2cc..455f88fa5d 100644 --- a/tests/auto/testserver.pri +++ b/tests/auto/testserver.pri @@ -93,7 +93,7 @@ isEmpty(TESTSERVER_VERSION) { # but it causes a port conflict if the user is running a service that # binds the same port on the host. An alternative solution is to deploy # the docker environment into VirtualBox using docker-machine. - TESTSERVER_COMPOSE_FILE = \ + isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-for-macOS.yml # The connection configuration for the target machine @@ -106,7 +106,7 @@ isEmpty(TESTSERVER_VERSION) { } else:equals(QMAKE_HOST.os, Windows) { # There is no docker bridge on Windows. It is impossible to ping a container. # Use docker-machine to deploy the docker environment into VirtualBox. - TESTSERVER_COMPOSE_FILE = \ + isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-for-windows.yml # The connection configuration for the target machine @@ -123,12 +123,14 @@ isEmpty(TESTSERVER_VERSION) { TEST_CMD = 'PowerShell -noprofile' CONFIG += PowerShell } else { - TESTSERVER_COMPOSE_FILE = $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml - + isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \ + $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml # The environment variables passed to the docker-compose file TEST_ENV = 'TEST_DOMAIN=$$DNSDOMAIN' TEST_CMD = env } + !exists($$TESTSERVER_COMPOSE_FILE): error("Invalid TESTSERVER_COMPOSE_FILE specified") + # The domain name is relevant to https keycert (qnetworkreply/crts/qt-test-net-cacert.pem). DEFINES += QT_TEST_SERVER QT_TEST_SERVER_DOMAIN=$$shell_quote(\"$${DNSDOMAIN}\") |