[tracker-miners/wip/carlosg/ci-coverage-all-tests] ci: Collect coverage information from all tests
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/ci-coverage-all-tests] ci: Collect coverage information from all tests
- Date: Sat, 3 Sep 2022 09:43:32 +0000 (UTC)
commit c9df893f68001605fccf4a859d94b985e488a17b
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Sep 3 11:39:39 2022 +0200
ci: Collect coverage information from all tests
Instead of doing a specific run to get testing coverage, collect the
information of all tests being done. Since some of these will check for
different build options, it's not possible to do that from a single run.
This way we will get accurate information for all code that is being
actually exercised by the tests.
.gitlab-ci.yml | 25 ++++++++++++++++---------
src/tracker-writeback/tracker-writeback-file.c | 3 +++
2 files changed, 19 insertions(+), 9 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b5ab5ebdf..29a550cb6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -243,6 +243,12 @@ build-ubuntu-rolling@x86_64:
dbus-run-session -- env LANG=C.UTF-8 LC_ALL=C.UTF-8 eatmydata meson test --suite tracker-miners
--print-errorlogs
after_script:
+ - pushd build
+ - gcovr --root=.. --filter='\.\./src/'
+ --exclude=../tests --exclude=subprojects --exclude=../subprojects
+ --exclude='\.\./build/.*\.[ch]$' --exclude='.*/tests/.*\.[ch]$'
+ --json --print-summary --output=../coverage-${CI_JOB_NAME}.json 2>/dev/null
+ - popd
- |
echo "Distribution: "
echo
@@ -261,6 +267,7 @@ build-ubuntu-rolling@x86_64:
when: always
paths:
- build/meson-logs/*.txt
+ - coverage-*.json
reports:
junit: "build/meson-logs/testlog.junit.xml"
@@ -298,27 +305,27 @@ test-ubuntu@x86_64:
- build-ubuntu-rolling@x86_64
<<: *test
-coverage-analysis:
+coverage:
extends:
- .fdo.distribution-image@fedora
- .tracker-miners.fedora:36@x86_64
stage: analysis
allow_failure: true
script:
- - .gitlab-ci/checkout-tracker.sh
- - mkdir -p coverage-build/coveragereport
- - cd coverage-build
- - meson .. --prefix=/usr -Dtracker_core=subproject -Db_lto=true -Db_coverage=true -Dseccomp=false
-Dtracker:docs=false
- - ninja
- - env LANG=C.UTF-8 LC_ALL=C.UTF-8 dbus-run-session eatmydata meson test --print-errorlogs
${MESON_TEST_EXTRA_ARGS}
- - gcovr --html-details --print-summary --root=.. --exclude=subprojects --exclude=../subprojects
--exclude=../tests --output coveragereport/index.html
+ - mkdir coveragereport
+ - gcovr --add-tracefile 'coverage-*.json'
+ --html-details --print-summary --output coveragereport/index.html
coverage: '/^lines: (\d+\.\d+\%)/'
artifacts:
when: always
paths:
- - coverage-build/coveragereport
+ - coveragereport
needs:
- test-fedora@x86_64
+ - test-fedora-rawhide@x86_64
+ - test-fedora@aarch64
+ - test-alpine@x86_64
+ - test-ubuntu@x86_64
coverity:
extends:
diff --git a/src/tracker-writeback/tracker-writeback-file.c b/src/tracker-writeback/tracker-writeback-file.c
index 49bea7bc1..0b4483945 100644
--- a/src/tracker-writeback/tracker-writeback-file.c
+++ b/src/tracker-writeback/tracker-writeback-file.c
@@ -215,6 +215,7 @@ tracker_writeback_file_write_metadata (TrackerWriteback *writeback,
mime_type = g_file_info_get_content_type (file_info);
content_types = (writeback_file_class->content_types) (TRACKER_WRITEBACK_FILE (writeback));
+ g_message ("HMMM %s %s %s\n", G_OBJECT_TYPE_NAME (writeback), g_file_peek_path (file), mime_type);
retval = FALSE;
@@ -226,6 +227,7 @@ tracker_writeback_file_write_metadata (TrackerWriteback *writeback,
}
if (!retval) {
+ g_message ("WHWHWHWHHW\n");
g_set_error (error,
TRACKER_DBUS_ERROR,
TRACKER_DBUS_ERROR_UNSUPPORTED,
@@ -239,6 +241,7 @@ tracker_writeback_file_write_metadata (TrackerWriteback *writeback,
return FALSE;
}
+ g_message ("WHOOOOOAAAT??\n");
/* Copy to a temporary file so we can perform an atomic write on move */
tmp_file = create_temporary_file (file, file_info, &n_error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]