feat: Add LCOV coverage support for Jenkins CI

- Add ENABLE_COVERAGE CMake option with gcov flags
- Create collect-coverage.sh script for LCOV workflow
- Add Qt6 test files with QTest framework
- Update Jenkinsfile with Coverage stage (main/master/coverage.*)
- Update CI Docker image with lcov and genhtml packages
- Add .gitignore entries for coverage artifacts
- Add COVERAGE.md documentation

Coverage workflow:
1. Configure with -DENABLE_COVERAGE=ON
2. Build and run tests to generate .gcda/.gcno files
3. Collect coverage with lcov
4. Filter out Qt/system libraries
5. Generate HTML report and lcov.info for Jenkins

Jenkins publishes coverage/lcov.info using Coverage Plugin.
Coverage stage only runs on protected branches.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 7783c7698334
Entire-Checkpoint: 70341e29996b
Signed-off-by: twi-devel <torsten.wierschin@life-maps.com>
This commit is contained in:
torstenandCopilot committed 2026-10-22 18:42:43 +02:00
1 parent 9e3c6eef2e
commit 78a81a95b6
19 files changed
+734 -235

No files matched your search

+11 -12
View File
@@ -2,30 +2,29 @@
#include <QMainWindow>
#include <QRegularExpression>
#include <QString>
QT_BEGIN_NAMESPACE
namespace Ui
{
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget* parent = nullptr);
~MainWindow() override;
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
[[nodiscard]] bool validateInput(const QString &text) const;
[[nodiscard]] QString getScreenInfo() const;
public slots:
void onValidateClicked();
void onScreenInfoClicked();
private:
Ui::MainWindow* ui;
QRegularExpression pattern;
private:
Ui::MainWindow *ui;
QRegularExpression m_pattern;
};