summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2017-03-29 10:13:09 +0200
committerDavid Schulz <david.schulz@qt.io>2017-03-29 12:39:09 +0000
commite0cb69745b1240480188e21720a52d7c86ecbc26 (patch)
treeb965bad3221823eba393677febcb49a944732c7c /src
parent4fbca421bdfd756571e77eea48a8e131dfc3c441 (diff)
downloadqt-creator-e0cb69745b1240480188e21720a52d7c86ecbc26.tar.gz
AutoTest: Fix handling of Qbs when searching for BuildTargetInfo
Amends 124efb32 - this special handling got lost between patch sets. Change-Id: Ic94145d3310668f1c63abe5443e0d833850227a7 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/autotest/testconfiguration.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/autotest/testconfiguration.cpp b/src/plugins/autotest/testconfiguration.cpp
index 6b1b710170..9ecd8d97ad 100644
--- a/src/plugins/autotest/testconfiguration.cpp
+++ b/src/plugins/autotest/testconfiguration.cpp
@@ -84,9 +84,13 @@ void TestConfiguration::completeTestInformation(int runMode)
return part->buildSystemTarget;
});
+ const Utils::FileName fn = Utils::FileName::fromString(m_projectFile);
const BuildTargetInfo targetInfo
- = Utils::findOrDefault(target->applicationTargets().list, [&buildSystemTargets] (const BuildTargetInfo &bti) {
- return buildSystemTargets.contains(bti.targetName);
+ = Utils::findOrDefault(target->applicationTargets().list,
+ [&buildSystemTargets, &fn] (const BuildTargetInfo &bti) {
+ return Utils::anyOf(buildSystemTargets, [&fn, &bti](const QString &b) {
+ return b == bti.targetName || (b.contains(bti.targetName) && bti.projectFilePath == fn);
+ });
});
const Utils::FileName executable = targetInfo.targetFilePath; // empty if BTI is default created
for (RunConfiguration *runConfig : target->runConfigurations()) {