aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotest/testconfiguration.cpp
diff options
context:
space:
mode:
authorChristian Stenger <[email protected]>2016-06-15 12:29:24 +0200
committerChristian Stenger <[email protected]>2016-06-22 10:51:12 +0000
commit5988fd0f5cae56999aa389405e1fa3e0394962ed (patch)
tree69725b2cc3e3f6f2cafadb468f1ba9c4af42af43 /src/plugins/autotest/testconfiguration.cpp
parent0e923c2a757ada234e316641a0732f93dfab6271 (diff)
AutoTest: Add minimum support for debugging tests
This adds another context menu entry for items on the test tree to allow debugging of a single test. Task-number: QTCREATORBUG-16070 Change-Id: I98f56b0f22c94ad71f0b91d690383043ed27f1c7 Reviewed-by: hjk <[email protected]> Reviewed-by: David Schulz <[email protected]>
Diffstat (limited to 'src/plugins/autotest/testconfiguration.cpp')
-rw-r--r--src/plugins/autotest/testconfiguration.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/autotest/testconfiguration.cpp b/src/plugins/autotest/testconfiguration.cpp
index 0dd8d0f283c..f5c24c49bb4 100644
--- a/src/plugins/autotest/testconfiguration.cpp
+++ b/src/plugins/autotest/testconfiguration.cpp
@@ -25,6 +25,8 @@
#include "testconfiguration.h"
#include "testoutputreader.h"
+#include "testrunconfiguration.h"
+#include "testrunner.h"
#include "testsettings.h"
#include <cpptools/cppmodelmanager.h>
@@ -84,7 +86,7 @@ static bool isLocal(RunConfiguration *runConfiguration)
return DeviceTypeKitInformation::deviceTypeId(kit) == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;
}
-void TestConfiguration::completeTestInformation()
+void TestConfiguration::completeTestInformation(int runMode)
{
QTC_ASSERT(!m_proFile.isEmpty(), return);
@@ -99,6 +101,7 @@ void TestConfiguration::completeTestInformation()
QString buildDir;
Project *targetProject = 0;
Utils::Environment env;
+ Target *runConfigTarget = 0;
bool hasDesktopTarget = false;
bool guessedRunConfiguration = false;
setProject(0);
@@ -152,6 +155,7 @@ void TestConfiguration::completeTestInformation()
workDir = Utils::FileUtils::normalizePathName(stdRunnable.workingDirectory);
env = stdRunnable.environment;
hasDesktopTarget = true;
+ runConfigTarget = rc->target();
break;
}
}
@@ -182,6 +186,8 @@ void TestConfiguration::completeTestInformation()
setEnvironment(env);
setProject(project);
setGuessedConfiguration(guessedRunConfiguration);
+ if (!guessedRunConfiguration && runMode == TestRunner::Debug)
+ m_runConfig = new TestRunConfiguration(runConfigTarget);
}
}