Support debug_and_release option (which is the default under Windows)
When debug_and_release option is in use, qmake will generate one mata-Makefile and two additional leaf Makefile (Makefile.Debug and Makefile.Release). In such case, testserver.pri will be included in all three passes. The problem is that the mata-Mafile is used to invoke leaf Mafile recursively. The docker test server should only be integrated in the leaf Makefile. To resolve this problem, this change uses "!build_pass" condition to determine whether this is a pass of meta-Makefile, and then skip it. Change-Id: Ibc48d657680e089ebaa1bc356b87eb4cfd9f4580 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
f7a7a49f92
commit
2c875efa99
@ -51,6 +51,11 @@
|
||||
# 2. testserver_clean - Clean up server containers/images and tidy away related
|
||||
# files.
|
||||
|
||||
# The docker test server should only be integrated in the leaf Makefile.
|
||||
# If debug_and_release option is in use, skip the meta-Makefile except for
|
||||
# Makefile.Debug and Makefile.Release.
|
||||
debug_and_release:!build_pass: return()
|
||||
|
||||
TESTSERVER_VERSION = $$system(docker-compose --version)
|
||||
|
||||
equals(QMAKE_HOST.os, Windows)|isEmpty(TESTSERVER_VERSION) {
|
||||
@ -124,7 +129,7 @@ equals(QMAKE_HOST.os, Windows)|isEmpty(TESTSERVER_VERSION) {
|
||||
--detach --force-recreate --timeout 1 $${QT_TEST_SERVER_LIST} &&
|
||||
|
||||
# Check test cases with docker-based test servers.
|
||||
testserver_test.commands += $(MAKE) check_network;
|
||||
testserver_test.commands += $(MAKE) -f $(MAKEFILE) check_network;
|
||||
|
||||
# Stop and remove test servers after testing.
|
||||
testserver_test.commands += docker-compose $$MACHINE_CONFIG -f $$TESTSERVER_COMPOSE_FILE down \
|
||||
|
Loading…
Reference in New Issue
Block a user