forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -185,8 +185,11 @@ void TestConfiguration::completeTestInformation(TestRunMode runMode)
|
|||||||
|
|
||||||
qCDebug(LOG) << " LocalExecutable" << localExecutable;
|
qCDebug(LOG) << " LocalExecutable" << localExecutable;
|
||||||
qCDebug(LOG) << " DeployedExecutable" << deployedExecutable;
|
qCDebug(LOG) << " DeployedExecutable" << deployedExecutable;
|
||||||
qCDebug(LOG) << "Iterating run configurations";
|
qCDebug(LOG) << "Iterating run configurations - prefer active over others";
|
||||||
for (RunConfiguration *runConfig : target->runConfigurations()) {
|
QList<RunConfiguration *> runConfigurations = target->runConfigurations();
|
||||||
|
runConfigurations.removeOne(target->activeRunConfiguration());
|
||||||
|
runConfigurations.prepend(target->activeRunConfiguration());
|
||||||
|
for (RunConfiguration *runConfig : qAsConst(runConfigurations)) {
|
||||||
qCDebug(LOG) << "RunConfiguration" << runConfig->id();
|
qCDebug(LOG) << "RunConfiguration" << runConfig->id();
|
||||||
if (!isLocal(target)) { // TODO add device support
|
if (!isLocal(target)) { // TODO add device support
|
||||||
qCDebug(LOG) << " Skipped as not being local";
|
qCDebug(LOG) << " Skipped as not being local";
|
||||||
|
Reference in New Issue
Block a user