forked from qt-creator/qt-creator
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 <christian.kandeler@qt.io>
This commit is contained in:
@@ -151,7 +151,12 @@ void TestConfiguration::completeTestInformation(int runMode)
|
|||||||
Runnable runnable = rc->runnable();
|
Runnable runnable = rc->runnable();
|
||||||
if (isLocal(rc) && runnable.is<StandardRunnable>()) {
|
if (isLocal(rc) && runnable.is<StandardRunnable>()) {
|
||||||
StandardRunnable stdRunnable = runnable.as<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);
|
workDir = Utils::FileUtils::normalizePathName(stdRunnable.workingDirectory);
|
||||||
env = stdRunnable.environment;
|
env = stdRunnable.environment;
|
||||||
hasDesktopTarget = true;
|
hasDesktopTarget = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user