extras: ci: ignore vlc_qrc.cpp coverage
When parsing the coverage with the Qt module enabled, gcovr was failing to parse the output for qt5-vlc_qrc.cpp, leading to the following error. $ gcovr -r build-meson --json gcovr.cov.json 130 ↵ (INFO) Reading coverage data... (WARNING) Unrecognized GCOV output for /home/alexandre/workspace/videolabs/vlc-master/build-meson/modules/gui/qt/qt5-vlc_qrc.cpp 37:60736-block 0 37:60751-block 0 37:60759-block 0 37:60767-block 0 37:60768-block 0 This is indicative of a gcov output parse error. Please report this to the gcovr developers at <https://github.com/gcovr/gcovr/issues>. (WARNING) Exception during parsing: UnknownLineType: 37:60736-block 0 (WARNING) Exception during parsing: UnknownLineType: 37:60751-block 0 (WARNING) Exception during parsing: UnknownLineType: 37:60759-block 0 (WARNING) Exception during parsing: UnknownLineType: 37:60767-block 0 (WARNING) Exception during parsing: UnknownLineType: 37:60768-block 0 (ERROR) Exiting because of parse errors. You can run gcovr with --gcov-ignore-parse-errors to continue anyway. (ERROR) Trouble processing 'vlc/build-meson/modules/libqt_plugin.so.p/meson-generated_.._gui_qt_qt5-vlc_qrc.cpp.gcda' with working directory '/home/alexandre/workspace/videolabs/vlc-master/build-meson'. Stdout of gcov was >>File 'modules/gui/qt/qt5-vlc_qrc.cpp' Lines executed:100.00% of 13 No branches Calls executed:100.00% of 5 Creating 'qt5-vlc_qrc.cpp##1ea0d75896cd542c555451d8b8bb4a44.gcov' Previously, it was trying to merge lines and triggered a negative hit, leading to the introduction of the gcovr parameter: --gcov-ignore-parse-errors=negative_hits.warn_once_per_file. (INFO) - MainThread - Reading coverage data... (WARNING) - Thread-29 (worker) - Unrecognized GCOV output for /builds/alexandre-janniaux/vlc/modules/codec/subsdec.c branch 2 taken -1 (fallthrough) This is indicative of a gcov output parse error. Please report this to the gcovr developers at <https://github.com/gcovr/gcovr/issues>. (WARNING) - Thread-29 (worker) - Exception during parsing: NegativeHits: Got negative hit value in gcov line 'branch 2 taken -1 (fallthrough)' caused by a bug in gcov tool, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68080. Use option --gcov-ignore-parse-errors with a value of negative_hits.warn, or negative_hits.warn_once_per_file. (ERROR) - Thread-29 (worker) - Exiting because of parse errors. You can run gcovr with --gcov-ignore-parse-errors to continue anyway. This option seems to still be needed since it is impacted by how coverage is computed by GCC. Issue #28490 also mentioned the following assertion: AssertionError: Got function MainUI::getComponent() const on multiple lines: 26, 27. You can run gcovr with --merge-mode-functions=MERGE_MODE. The available values for MERGE_MODE are described in the documentation. This assertion was due to --merge-mode-functions[^1] not being accounted, which it now does in gcovr 7.0[^2], and files using Q_OBJECT and the MOC code generator, duplicating some inline functions from headers. class MainUI : public QObject { Q_OBJECT public: /* The line below duplicates a function definition at two different * locations because of MOC. */ inline QQmlComponent* getComponent() const {return m_component;} We don't need this file to have its coverage checked since it's generated from an XML file, so let's just ignore it from the coverage entirely. [^1]: https://github.com/gcovr/gcovr/pull/700 [^2]: https://github.com/gcovr/gcovr/pull/844 Fixes #28533 #28490
parent
4a0b1e06
No related branches found
No related tags found
Please register or sign in to comment