Changeset View
Changeset View
Standalone View
Standalone View
projectmanagers/cmake/testing/ctestsuite.cpp
Show All 32 Lines | |||||
33 | #include <language/duchain/functiondefinition.h> | 33 | #include <language/duchain/functiondefinition.h> | ||
34 | #include <language/duchain/duchainutils.h> | 34 | #include <language/duchain/duchainutils.h> | ||
35 | #include <language/duchain/types/structuretype.h> | 35 | #include <language/duchain/types/structuretype.h> | ||
36 | #include <project/projectmodel.h> | 36 | #include <project/projectmodel.h> | ||
37 | 37 | | |||
38 | 38 | | |||
39 | using namespace KDevelop; | 39 | using namespace KDevelop; | ||
40 | 40 | | |||
41 | CTestSuite::CTestSuite(const QString& name, const KDevelop::Path &executable, const QList<KDevelop::Path>& files, IProject* project, const QStringList& args, bool expectFail): | 41 | CTestSuite::CTestSuite(const QString& name, const KDevelop::Path &executable, const QList<KDevelop::Path>& files, IProject* project, const QStringList& args, const QHash<QString, QString>& properties): | ||
42 | m_executable(executable), | 42 | m_executable(executable), | ||
43 | m_name(name), | 43 | m_name(name), | ||
44 | m_args(args), | 44 | m_args(args), | ||
45 | m_files(files), | 45 | m_files(files), | ||
46 | m_project(project), | 46 | m_project(project), | ||
47 | m_expectFail(expectFail) | 47 | m_properties(properties) | ||
48 | { | 48 | { | ||
49 | Q_ASSERT(project); | 49 | Q_ASSERT(project); | ||
50 | qCDebug(CMAKE) << m_name << m_executable << m_project->name(); | 50 | qCDebug(CMAKE) << m_name << m_executable << m_project->name(); | ||
51 | } | 51 | } | ||
52 | 52 | | |||
53 | CTestSuite::~CTestSuite() | 53 | CTestSuite::~CTestSuite() | ||
54 | { | 54 | { | ||
55 | 55 | | |||
▲ Show 20 Lines • Show All 78 Lines • ▼ Show 20 Line(s) | 133 | { | |||
134 | return launchCases(QStringList() << testCase, verbosity); | 134 | return launchCases(QStringList() << testCase, verbosity); | ||
135 | } | 135 | } | ||
136 | 136 | | |||
137 | KJob* CTestSuite::launchCases(const QStringList& testCases, ITestSuite::TestJobVerbosity verbosity) | 137 | KJob* CTestSuite::launchCases(const QStringList& testCases, ITestSuite::TestJobVerbosity verbosity) | ||
138 | { | 138 | { | ||
139 | qCDebug(CMAKE) << "Launching test run" << m_name << "with cases" << testCases; | 139 | qCDebug(CMAKE) << "Launching test run" << m_name << "with cases" << testCases; | ||
140 | 140 | | |||
141 | OutputJob::OutputJobVerbosity outputVerbosity = (verbosity == Verbose) ? OutputJob::Verbose : OutputJob::Silent; | 141 | OutputJob::OutputJobVerbosity outputVerbosity = (verbosity == Verbose) ? OutputJob::Verbose : OutputJob::Silent; | ||
142 | return new CTestRunJob(this, testCases, outputVerbosity, m_expectFail); | 142 | return new CTestRunJob(this, testCases, outputVerbosity); | ||
143 | } | 143 | } | ||
144 | 144 | | |||
145 | KJob* CTestSuite::launchAllCases(TestJobVerbosity verbosity) | 145 | KJob* CTestSuite::launchAllCases(TestJobVerbosity verbosity) | ||
146 | { | 146 | { | ||
147 | return launchCases(cases(), verbosity); | 147 | return launchCases(cases(), verbosity); | ||
148 | } | 148 | } | ||
149 | 149 | | |||
150 | KDevelop::Path CTestSuite::executable() const | 150 | KDevelop::Path CTestSuite::executable() const | ||
Show All 36 Lines | 186 | { | |||
187 | m_cases = cases; | 187 | m_cases = cases; | ||
188 | } | 188 | } | ||
189 | 189 | | |||
190 | QList<KDevelop::Path> CTestSuite::sourceFiles() const | 190 | QList<KDevelop::Path> CTestSuite::sourceFiles() const | ||
191 | { | 191 | { | ||
192 | return m_files; | 192 | return m_files; | ||
193 | } | 193 | } | ||
194 | 194 | | |||
195 | 195 | QHash<QString, QString> CTestSuite::properties() const | |||
196 | 196 | { | |||
197 | return m_properties; | ||||
198 | } |