feature/integrate-jenkins-code-coverage #3

Merged
torsten merged 19 commits from feature/integrate-jenkins-code-coverage into main 2026-10-22 20:59:05 +00:00
Collaborator

Merge jenkins code coverage integration in

Merge jenkins code coverage integration in
twi-devel added 2 commits 2026-10-22 16:11:34 +00:00
- 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
ci: Add current SSH key to allowed_signers
qt-migration-copilot-demo/pipeline/head There was a failure building this commit
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
41d9ef4b7a
Add ED25519 key for torsten.wierschin@life-maps.com to enable
signed commits for CI policy validation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 074fdb682ad5
twi-devel added 1 commit 2026-10-22 16:12:44 +00:00
fix: Add Qt6::Test component to find_package
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
e2e243ad26
- Missing Qt6::Test component caused CMake configuration failure in Jenkins
- Required for test executable linking

Entire-Checkpoint: ec1d65182c71
twi-devel added 1 commit 2026-10-22 16:14:03 +00:00
style: Apply clang-format to all C++ files
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
7aadf4212e
- Format MainWindow.cpp, MainWindow.h, main.cpp
- Format test files (test_main.cpp, test_mainwindow.cpp)
- Fixes Jenkins clang-format policy check

Entire-Checkpoint: ea47c089bf3a
twi-devel added 1 commit 2026-10-22 16:15:30 +00:00
fix: CMake include path and QString literals
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
d79dcac3b3
- Add target_include_directories for test target to find MainWindow.h
- Replace u""_s literals with QStringLiteral() for compiler compatibility
- Fixes Jenkins build errors

Entire-Checkpoint: 0e6491fe1b1c
twi-devel added 1 commit 2026-10-22 16:18:31 +00:00
Add workspace cleanup stage to prevent corruption issues
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
50073e010f
- Add Cleanup stage at pipeline start to wipe workspace before checkout
- Prevents 'corrupt .git repository' errors from stale build artifacts
- Uses disableDeferredWipeout for thorough cleanup

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: f6767c4eba2c
twi-devel added 1 commit 2026-10-22 16:20:41 +00:00
Fix Jenkins workspace cleanup with chmod before rm
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
ba8479fa8d
- Replace cleanWs with shell commands that fix permissions before deletion
- Handle build/, build-coverage/, and coverage/ directories
- Use chmod -R u+w to make files writable before rm -rf
- Addresses 'Operation not permitted' errors on Jenkins host

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 9acfd6cc578c
twi-devel added 1 commit 2026-10-22 16:27:08 +00:00
Fix Jenkins workspace permission issue
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
947e910c1a
- Add jenkins user to Dockerfile.ci and run as non-root
- Remove '-u root:root' args from Jenkinsfile Docker agent
- Build files will now be owned by jenkins user, allowing proper cleanup

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: f545f3d8aa33
twi-devel force-pushed feature/integrate-jenkins-code-coverage from 947e910c1a to 0d37751d8c 2026-10-22 16:41:15 +00:00 Compare
twi-devel force-pushed feature/integrate-jenkins-code-coverage from 0d37751d8c to 27dbe998b1 2026-10-22 16:42:50 +00:00 Compare
twi-devel added 1 commit 2026-10-22 16:45:37 +00:00
Fix QString literals in test_mainwindow.cpp
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
c312c7ab31
Replace u""_s with QStringLiteral() for compiler compatibility

Entire-Checkpoint: 7fd5c52cf858
twi-devel added 1 commit 2026-10-22 16:49:16 +00:00
Fix duplicate main() linker error in tests
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
468e18560f
- Merged test_mainwindow.cpp tests into test_main.cpp to have single main()
- Removed test_mainwindow.cpp from CMakeLists.txt test executable
- Qt test executables should have only one main() via QTEST_MAIN()

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 0f6858921c53
twi-devel added 1 commit 2026-10-22 16:53:36 +00:00
Rename test file to match policy script pattern
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
78d273a07a
- Rename tests/test_main.cpp to tests/test_mainwindow.cpp
- Update CMakeLists.txt to reference new test filename
- This ensures policy check script finds matching test for MainWindow.cpp

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: fa1f655c111a
twi-devel added 1 commit 2026-10-22 17:18:40 +00:00
Fix AutoMOC: include correct moc file in test_mainwindow.cpp
qt-migration-copilot-demo/pipeline/pr-main This commit looks good
fda4b23734
- Changed #include from test_main.moc to test_mainwindow.moc
- Required for Qt Meta-Object Compiler to process Q_OBJECT macro

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 5ac05d07f260
twi-devel added 1 commit 2026-10-22 17:23:59 +00:00
Allow Coverage stage on feature branches
qt-migration-copilot-demo/pipeline/pr-main This commit looks good
2117e2ff80
- Update branch condition to include feature/* branches
- Coverage stage now runs on main, master, coverage.*, and feature.* branches

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 29232d1106cb
twi-devel added 1 commit 2026-10-22 17:26:54 +00:00
Fix Coverage stage branch check for PR builds
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
4f6b09db3e
Use CHANGE_BRANCH for PR builds (BRANCH_NAME is PR-3 in PR context)

Entire-Checkpoint: 7a9bf7a0810d
twi-devel added 1 commit 2026-10-22 17:37:03 +00:00
Fix Dockerfile: GID 1001, remove genhtml (included in lcov), cleanup test file
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
0162466168
Entire-Checkpoint: 0d9a8cfb0768
twi-devel added 1 commit 2026-10-22 17:45:43 +00:00
Jenkinsfile: Build Docker image locally when not present
qt-migration-copilot-demo/pipeline/pr-main Something is wrong with the build of this commit
7d7adf5a54
- Add Docker Image stage that checks if image exists and builds if needed
- Fix nested stages structure in Build and Test stage
- Docker image built on Jenkins host instead of pulling from registry
- Resolves 'pull access denied' error when image not in registry

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 443ea4c1ce1c
twi-devel added 1 commit 2026-10-22 17:47:44 +00:00
Fix Jenkins agent label: use 'agent any' instead of 'label any'
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
2099761c09
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 1502e571778c
twi-devel added 1 commit 2026-10-22 17:52:43 +00:00
Fix lcov unused exclude pattern error
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
63444f8f14
Add 'unused' to --ignore-errors to handle exclude patterns that may not match
all files in all build configurations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: b013634f799e
twi-devel added 1 commit 2026-10-22 17:54:41 +00:00
Fix Jenkins coverage plugin syntax: use recordCoverage instead of lcovAdapter
qt-migration-copilot-demo/pipeline/pr-main This commit looks good
qt-migration-copilot-demo/pipeline/head Build queued...
08edfc17ee
- Jenkins Coverage Plugin 4.x+ uses recordCoverage method
- Replaced deprecated publishCoverage with lcovAdapter syntax
- New syntax: recordCoverage tools: [[parser: 'LCOV', pattern: '...']]

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 02bccf38a4ee
twi-devel requested review from torsten 2026-10-22 17:55:58 +00:00
torsten was assigned by twi-devel 2026-10-22 17:59:30 +00:00
twi-devel self-assigned this 2026-10-22 17:59:30 +00:00
twi-devel removed their assignment 2026-10-22 17:59:35 +00:00
torsten approved these changes 2026-10-22 18:02:30 +00:00
torsten merged commit 5091e2dbf1 into main 2026-10-22 20:59:05 +00:00
torsten deleted branch feature/integrate-jenkins-code-coverage 2026-10-22 20:59:16 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lifemaps/qt-migration-copilot-demo#3