PE: Prepare build system for providing test information

This allows later on to provide build system based test runs.

Task-number: QTCREATORBUG-23332
Change-Id: I7e26cd2b6a7d304faec79363ce4c2368287c2300
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Christian Stenger
2020-09-29 11:10:29 +02:00
parent 882dd60aad
commit c44e13a3f8
2 changed files with 18 additions and 0 deletions

View File

@@ -368,4 +368,10 @@ QString BuildSystem::disabledReason(const QString &buildKey) const
return {}; return {};
} }
CommandLine BuildSystem::commandLineForTests(const QList<QString> & /*tests*/,
const QStringList & /*options*/) const
{
return {};
}
} // namespace ProjectExplorer } // namespace ProjectExplorer

View File

@@ -38,6 +38,13 @@ namespace ProjectExplorer {
class BuildConfiguration; class BuildConfiguration;
class Node; class Node;
struct TestCaseInfo
{
QString name;
Utils::FilePath path;
int line = 0;
};
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// BuildSystem: // BuildSystem:
// -------------------------------------------------------------------- // --------------------------------------------------------------------
@@ -95,6 +102,10 @@ public:
void setRootProjectNode(std::unique_ptr<ProjectNode> &&root); void setRootProjectNode(std::unique_ptr<ProjectNode> &&root);
virtual const QList<TestCaseInfo> testcasesInfo() const { return {}; }
virtual Utils::CommandLine commandLineForTests(const QList<QString> &tests,
const QStringList &options) const;
class PROJECTEXPLORER_EXPORT ParseGuard class PROJECTEXPLORER_EXPORT ParseGuard
{ {
friend class BuildSystem; friend class BuildSystem;
@@ -138,6 +149,7 @@ signals:
void parsingFinished(bool success); void parsingFinished(bool success);
void deploymentDataChanged(); void deploymentDataChanged();
void applicationTargetsChanged(); void applicationTargetsChanged();
void testInformationUpdated();
protected: protected:
// Helper methods to manage parsing state and signalling // Helper methods to manage parsing state and signalling