Commit 8c42cd9e authored by Christian Stenger's avatar Christian Stenger
Browse files

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's avatarChristian Kandeler <>
parent 80ca67e4
......@@ -151,7 +151,12 @@ void TestConfiguration::completeTestInformation(int runMode)
Runnable runnable = rc->runnable();
if (isLocal(rc) &&<StandardRunnable>()) {
StandardRunnable stdRunnable =<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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment