aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotest/testconfiguration.cpp
diff options
context:
space:
mode:
authorChristian Stenger <[email protected]>2017-09-05 13:57:22 +0200
committerChristian Stenger <[email protected]>2017-09-18 10:01:18 +0000
commit8288eadac6b1c3bc8a1965f8da749af67e646785 (patch)
tree46d1aa09626a1df872f8c67f5073cda1e60ec6b5 /src/plugins/autotest/testconfiguration.cpp
parentf885785564f16c58f04e7644cf29a59675d7ca29 (diff)
AutoTest: Unify handling of run modes
Move used enums more central to avoid duplicating information and unify their usages. Change-Id: I33e9bdc11f7da16ecabf03991b5a5f550a53bdad Reviewed-by: Oliver Wolff <[email protected]>
Diffstat (limited to 'src/plugins/autotest/testconfiguration.cpp')
-rw-r--r--src/plugins/autotest/testconfiguration.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/autotest/testconfiguration.cpp b/src/plugins/autotest/testconfiguration.cpp
index cf3979b4291..396fbb4f1c8 100644
--- a/src/plugins/autotest/testconfiguration.cpp
+++ b/src/plugins/autotest/testconfiguration.cpp
@@ -26,7 +26,6 @@
#include "testconfiguration.h"
#include "testoutputreader.h"
#include "testrunconfiguration.h"
-#include "testrunner.h"
#include <cpptools/cppmodelmanager.h>
#include <cpptools/projectinfo.h>
@@ -73,7 +72,7 @@ static QString ensureExeEnding(const QString& file)
return Utils::HostOsInfo::withExecutableSuffix(file);
}
-void TestConfiguration::completeTestInformation(int runMode)
+void TestConfiguration::completeTestInformation(TestRunMode runMode)
{
QTC_ASSERT(!m_projectFile.isEmpty(), return);
QTC_ASSERT(!m_buildTargets.isEmpty(), return);
@@ -158,7 +157,7 @@ void TestConfiguration::completeTestInformation(int runMode)
m_runnable.executable = currentExecutable;
m_displayName = runConfig->displayName();
m_project = project;
- if (runMode == TestRunner::Debug)
+ if (runMode == TestRunMode::Debug || runMode == TestRunMode::DebugWithoutDeploy)
m_runConfig = new TestRunConfiguration(runConfig->target(), this);
break;
}
@@ -182,7 +181,7 @@ void TestConfiguration::completeTestInformation(int runMode)
m_project = project;
m_guessedConfiguration = true;
m_guessedFrom = rc->displayName();
- if (runMode == TestRunner::Debug)
+ if (runMode == TestRunMode::Debug)
m_runConfig = new TestRunConfiguration(rc->target(), this);
}
} else {
@@ -291,5 +290,10 @@ QString TestConfiguration::workingDirectory() const
return executable.isEmpty() ? executable : QFileInfo(executable).absolutePath();
}
+bool DebuggableTestConfiguration::isDebugRunMode() const
+{
+ return m_runMode == TestRunMode::Debug || m_runMode == TestRunMode::DebugWithoutDeploy;
+}
+
} // namespace Internal
} // namespace Autotest