Allow other projects to use the CMake feature for docker-based tests
Introduce a new QT_TESTSERVER_COMPOSE_FILE variable for setting a custom docker compose file path, which can be set by projects outside of qtbase (e.g. QtCoap). If the variable is not set, fallback to the compose file located in qtbase. Task-number: QTBUG-85034 Change-Id: I4c0c9b161cad9787b089ef7e9da2aa00352a9159 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
parent
27d96b4789
commit
701536b218
@ -136,7 +136,11 @@ function(qt_internal_setup_docker_test_fixture name)
|
||||
QT_TEST_SERVER QT_TEST_SERVER_NAME QT_TEST_SERVER_DOMAIN=\"${DNSDOMAIN}\"
|
||||
)
|
||||
|
||||
set(TESTSERVER_COMPOSE_FILE "${QT_SOURCE_TREE}/tests/testserver/docker-compose-bridge-network.yml")
|
||||
if(DEFINED QT_TESTSERVER_COMPOSE_FILE)
|
||||
set(TESTSERVER_COMPOSE_FILE ${QT_TESTSERVER_COMPOSE_FILE})
|
||||
else()
|
||||
set(TESTSERVER_COMPOSE_FILE "${QT_SOURCE_TREE}/tests/testserver/docker-compose-bridge-network.yml")
|
||||
endif()
|
||||
|
||||
# Bring up test servers and make sure the services are ready.
|
||||
add_test(NAME ${name}-setup COMMAND
|
||||
|
Loading…
Reference in New Issue
Block a user