jihuayu opened a new pull request, #3511: URL: https://github.com/apache/kvrocks/pull/3511
The previous `go test` code coverage data could be overwritten by the coverage data from `kvrocks2redis`, which caused the overall coverage metric to be lower than expected. This fixes the SonarCloud coverage job so the kvrocks2redis test no longer corrupts gcov data generated by the main C++ and Go tests. Previously, the coverage job ran the normal test suite and then ran the kvrocks2redis test from the same coverage build. Both `kvrocks` and `kvrocks2redis` link `kvrocks_objs`, so they wrote to the same `.gcda` files. This produced `libgcov profiling error: overwriting an existing profile data with a different timestamp` and could make SonarCloud report some covered files as uncovered. The fix keeps the coverage data isolated: - collect the main C++/Go coverage into `coverage-main.json` - run the kvrocks2redis source server from a separate coverage build directory - run the kvrocks2redis tool itself from a non-coverage build directory to avoid writing conflicting `kvrocks_objs` profiles - stop daemonized test processes before collecting coverage - merge both tracefiles into one SonarQube XML report This does not add new command coverage by itself. It makes sure coverage produced by existing tests is preserved and merged correctly instead of being overwritten by the kvrocks2redis stage. Assisted-by: Codex/GPT5.5 xhigh -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
