aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotest
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2020-10-15 13:30:11 +0200
committerChristian Stenger <christian.stenger@qt.io>2020-10-16 06:22:31 +0000
commitd11aa98219561650a5a10a02468f81eafedf3943 (patch)
tree3be772d6c8091ca4f17df99655fae1b4a618a269 /src/plugins/autotest
parent4cb4bcec0f42022cefe2b4b4e28f954aff618259 (diff)
AutoTest: Prefer active target over further
If there are more than one target for a run configuration we ended up in the first matching. Tests may use different environments to test different things. If the user tried to handle this by using a modified environment for different targets failed even when the correct target was selected. Change-Id: Ie954c985969ffd187fe60b4ecb86aa2717d559f1 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/autotest')
-rw-r--r--src/plugins/autotest/testconfiguration.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/autotest/testconfiguration.cpp b/src/plugins/autotest/testconfiguration.cpp
index 10709e38a61..785abe4f753 100644
--- a/src/plugins/autotest/testconfiguration.cpp
+++ b/src/plugins/autotest/testconfiguration.cpp
@@ -185,8 +185,11 @@ void TestConfiguration::completeTestInformation(TestRunMode runMode)
qCDebug(LOG) << " LocalExecutable" << localExecutable;
qCDebug(LOG) << " DeployedExecutable" << deployedExecutable;
- qCDebug(LOG) << "Iterating run configurations";
- for (RunConfiguration *runConfig : target->runConfigurations()) {
+ qCDebug(LOG) << "Iterating run configurations - prefer active over others";
+ QList<RunConfiguration *> runConfigurations = target->runConfigurations();
+ runConfigurations.removeOne(target->activeRunConfiguration());
+ runConfigurations.prepend(target->activeRunConfiguration());
+ for (RunConfiguration *runConfig : qAsConst(runConfigurations)) {
qCDebug(LOG) << "RunConfiguration" << runConfig->id();
if (!isLocal(target)) { // TODO add device support
qCDebug(LOG) << " Skipped as not being local";