summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRyan Chu <ryan.chu@qt.io>2019-01-08 14:34:30 +0100
committerRyan Chu <ryan.chu@qt.io>2019-01-15 23:40:13 +0000
commit2c875efa999527b5d1419ea06d786b0a462c7133 (patch)
treeead09b47bd8f58e1a3c7ecd4bee93f0630d3a898 /tests
parentf7a7a49f9235c9375fc515a3062341f285f3c2c3 (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/testserver.pri7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/testserver.pri b/tests/auto/testserver.pri
index 7dd32db0af..1a8b5a8187 100644
--- a/tests/auto/testserver.pri
+++ b/tests/auto/testserver.pri
@@ -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 \