summaryrefslogtreecommitdiffstats
path: root/qmake-features
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2017-01-19 11:48:36 +0100
committerRobert Griebl <robert.griebl@pelagicore.com>2017-01-20 13:00:18 +0000
commit62bb2fb497119fe867fabf34f6df1d3e3d9b30b1 (patch)
treea7cbdede1cdbb0a785c57a5cca1ce55186ae0fd7 /qmake-features
parent1877c9d9567adc1b304ec951262f730ada5a2f81 (diff)
am-qml-testcase: Run all tests in single and multi-process mode by default
The new MODE option can be used to specify how the qml unit test should be executed, by default it is started in single and multi-process mode if the platform/build allows that. Change-Id: I2a19353099d7194261554c7861fc15780b96481b Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Diffstat (limited to 'qmake-features')
-rw-r--r--qmake-features/am-qml-testcase.prf12
1 files changed, 11 insertions, 1 deletions
diff --git a/qmake-features/am-qml-testcase.prf b/qmake-features/am-qml-testcase.prf
index d74fa082..e8283220 100644
--- a/qmake-features/am-qml-testcase.prf
+++ b/qmake-features/am-qml-testcase.prf
@@ -22,6 +22,9 @@ debug_and_release:debug_and_release_target {
# Allow for a custom test runner script
COMMAND += $(TESTRUNNER)
+# Define how the appman should be run, single-process, multi-process, both
+isEmpty(MODE): MODE = both
+
# Determine the location of the testrunner
prefix_build {
AM_TESTRUNNER_DIR = $$BUILD_DIR/bin
@@ -37,6 +40,10 @@ prefix_build {
COMMAND += $$AM_TESTRUNNER_DIR/appman-qmltestrunner -r --no-dlt-logging
mac: COMMAND += --dbus=none
multi-process: COMMAND += --start-session-dbus
+!multi-process: {
+ message("Overriding mode as application-manager is build in single-process mode")
+ MODE = single-process
+}
# Add import dirs
for(import, IMPORTS_DIR) {
@@ -55,8 +62,11 @@ OTHER_FILES += $$AM_CONFIG
QMAKE_EXTRA_TARGETS *= check
+message("$$MODE")
# Execute a testrunner for every file
for(file, TEST_FILES) {
- check.commands += $$COMMAND $$absolute_path($$file, $$_PRO_FILE_PWD_) -- $(TESTARGS)
+ !equals(MODE, "single-process"):check.commands += $$COMMAND $$absolute_path($$file, $$_PRO_FILE_PWD_) --force-multi-process -- $(TESTARGS) &&
+ !equals(MODE, "multi-process"):check.commands += $$COMMAND $$absolute_path($$file, $$_PRO_FILE_PWD_) --force-single-process -- $(TESTARGS) &&
}
+check.commands += true;
OTHER_FILES += $$TEST_FILES