[glib: 1/2] build: Move lcovrc file to root so it’s picked up by Meson




commit 8e295e23a5020113410fa838f1879e3f7d7f558c
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Apr 28 11:57:45 2022 +0100

    build: Move lcovrc file to root so it’s picked up by Meson
    
    Move the lcovrc file to the root of the project, so that it’s picked up
    by Meson when running `ninja coverage` locally.
    
    See https://github.com/mesonbuild/meson/issues/4628
    
    This won’t affect the code coverage run on the CI, since that explicitly
    used the lcovrc file already.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 .gitlab-ci.yml                | 4 ++--
 .gitlab-ci/coverage-docker.sh | 6 +++---
 .gitlab-ci/test-msys2.sh      | 4 ++--
 .gitlab-ci/lcovrc => .lcovrc  | 0
 4 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a5c664576d..1093b5cbe7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -95,9 +95,9 @@ fedora-x86_64:
             _build
     - ninja -C _build
     - mkdir -p _coverage
-    - lcov --config-file .gitlab-ci/lcovrc --directory _build --capture --initial --output-file 
"_coverage/${CI_JOB_NAME}-baseline.lcov"
+    - lcov --config-file .lcovrc --directory _build --capture --initial --output-file 
"_coverage/${CI_JOB_NAME}-baseline.lcov"
     - .gitlab-ci/run-tests.sh
-    - lcov --config-file .gitlab-ci/lcovrc --directory _build --capture --output-file 
"_coverage/${CI_JOB_NAME}.lcov"
+    - lcov --config-file .lcovrc --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
   artifacts:
     reports:
       junit: "_build/${CI_JOB_NAME}-report.xml"
diff --git a/.gitlab-ci/coverage-docker.sh b/.gitlab-ci/coverage-docker.sh
index a80b3beeb1..df3273fa0b 100755
--- a/.gitlab-ci/coverage-docker.sh
+++ b/.gitlab-ci/coverage-docker.sh
@@ -7,14 +7,14 @@ python3 ./.gitlab-ci/fixup-cov-paths.py _coverage/*.lcov
 
 for path in _coverage/*.lcov; do
     # Remove coverage from generated code in the build directory
-    lcov --config-file .gitlab-ci/lcovrc -r "${path}" '*/_build/*' -o "$(pwd)/${path}"
+    lcov --config-file .lcovrc -r "${path}" '*/_build/*' -o "$(pwd)/${path}"
     # Remove any coverage from system files
-    lcov --config-file .gitlab-ci/lcovrc -e "${path}" "$(pwd)/*" -o "$(pwd)/${path}"
+    lcov --config-file .lcovrc -e "${path}" "$(pwd)/*" -o "$(pwd)/${path}"
 done
 
 genhtml \
     --ignore-errors=source \
-    --config-file .gitlab-ci/lcovrc \
+    --config-file .lcovrc \
     _coverage/*.lcov \
     -o _coverage/coverage
 
diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh
index 0d18155939..ace412373f 100755
--- a/.gitlab-ci/test-msys2.sh
+++ b/.gitlab-ci/test-msys2.sh
@@ -44,7 +44,7 @@ ninja
 
 lcov \
     --quiet \
-    --config-file "${DIR}"/.gitlab-ci/lcovrc \
+    --config-file "${DIR}"/.lcovrc \
     --directory "${DIR}/_build" \
     --capture \
     --initial \
@@ -61,7 +61,7 @@ python3 "${DIR}"/.gitlab-ci/meson-junit-report.py \
 
 lcov \
     --quiet \
-    --config-file "${DIR}"/.gitlab-ci/lcovrc \
+    --config-file "${DIR}"/.lcovrc \
     --directory "${DIR}/_build" \
     --capture \
     --output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"
diff --git a/.gitlab-ci/lcovrc b/.lcovrc
similarity index 100%
rename from .gitlab-ci/lcovrc
rename to .lcovrc


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]