From c44e13a3f8f20f3084ef6afabb374b2c99e2dd02 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 29 Sep 2020 11:10:29 +0200 Subject: [PATCH] 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 --- src/plugins/projectexplorer/buildsystem.cpp | 6 ++++++ src/plugins/projectexplorer/buildsystem.h | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/plugins/projectexplorer/buildsystem.cpp b/src/plugins/projectexplorer/buildsystem.cpp index b91af550d6d..79e4e3ff2b0 100644 --- a/src/plugins/projectexplorer/buildsystem.cpp +++ b/src/plugins/projectexplorer/buildsystem.cpp @@ -368,4 +368,10 @@ QString BuildSystem::disabledReason(const QString &buildKey) const return {}; } +CommandLine BuildSystem::commandLineForTests(const QList & /*tests*/, + const QStringList & /*options*/) const +{ + return {}; +} + } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/buildsystem.h b/src/plugins/projectexplorer/buildsystem.h index 305d296b4c9..8171300980a 100644 --- a/src/plugins/projectexplorer/buildsystem.h +++ b/src/plugins/projectexplorer/buildsystem.h @@ -38,6 +38,13 @@ namespace ProjectExplorer { class BuildConfiguration; class Node; +struct TestCaseInfo +{ + QString name; + Utils::FilePath path; + int line = 0; +}; + // -------------------------------------------------------------------- // BuildSystem: // -------------------------------------------------------------------- @@ -95,6 +102,10 @@ public: void setRootProjectNode(std::unique_ptr &&root); + virtual const QList testcasesInfo() const { return {}; } + virtual Utils::CommandLine commandLineForTests(const QList &tests, + const QStringList &options) const; + class PROJECTEXPLORER_EXPORT ParseGuard { friend class BuildSystem; @@ -138,6 +149,7 @@ signals: void parsingFinished(bool success); void deploymentDataChanged(); void applicationTargetsChanged(); + void testInformationUpdated(); protected: // Helper methods to manage parsing state and signalling