diff options
author | Christian Stenger <[email protected]> | 2016-07-27 14:48:16 +0200 |
---|---|---|
committer | Christian Stenger <[email protected]> | 2016-07-28 09:21:41 +0000 |
commit | 8c42cd9e23ee3be7d757960be95678f9743a5ed7 (patch) | |
tree | f7fd02926bc9297d569144aa9fbe623cca2ece8b /src/plugins/autotest/testconfiguration.cpp | |
parent | 80ca67e43fea432e58305b31c552d31306ac352f (diff) |
AutoTest: Fix retrieval of executable
Respect different location if tests are installed
before executing.
Task-number: QTCREATORBUG-16638
Change-Id: I2d154e26cdd0f28bd51e7a885c5486d36af38a68
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/plugins/autotest/testconfiguration.cpp')
-rw-r--r-- | src/plugins/autotest/testconfiguration.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/autotest/testconfiguration.cpp b/src/plugins/autotest/testconfiguration.cpp index 0e92789ae3f..1082594009b 100644 --- a/src/plugins/autotest/testconfiguration.cpp +++ b/src/plugins/autotest/testconfiguration.cpp @@ -151,7 +151,12 @@ void TestConfiguration::completeTestInformation(int runMode) Runnable runnable = rc->runnable(); if (isLocal(rc) && runnable.is<StandardRunnable>()) { StandardRunnable stdRunnable = runnable.as<StandardRunnable>(); - if (stdRunnable.executable == targetFile) { + // we might have an executable that gets installed - in such a case the + // runnable's executable and targetFile won't match - but the (unique) display name + // of the run configuration should match targetName + if (stdRunnable.executable == targetFile + || (!targetName.isEmpty() && rc->displayName() == targetName)) { + targetFile = stdRunnable.executable; workDir = Utils::FileUtils::normalizePathName(stdRunnable.workingDirectory); env = stdRunnable.environment; hasDesktopTarget = true; |