From 7cf6de0bb9e80af2bb97d5eb53cba713f1fa0203 Mon Sep 17 00:00:00 2001 From: bennibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Thu, 30 May 2024 09:43:48 -0500 Subject: [PATCH 1/4] filter out build/_deps directory from lcov coverage --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3c044e7ced..7876a8a712 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -105,13 +105,13 @@ WORKDIR /cyclus RUN python3 install.py -j ${make_cores} --allow-milps --code-coverage ENV PATH /root/.local/bin:$PATH -ENV LD_LIBRARY_PATH /root/.local/lib:/root/.local/lib/cyclus RUN lcov -c -d /cyclus -o initial_coverage.info --gcov-tool ${GCOV} --initial --no-external && \ cyclus_unit_tests && \ cd tests && python3 -m pytest && cd .. && \ lcov -c -d /cyclus -o test_coverage.info --gcov-tool ${GCOV} --no-external && \ lcov --add-tracefile initial_coverage.info --add-tracefile test_coverage.info -o total_coverage.info && \ - mkdir -p html && genhtml total_coverage.info --output-directory html + lcov --remove total_coverage.info -o filtered_coverage.info '/cyclus/build/_deps/**' + mkdir -p html && genhtml filtered_coverage.info --output-directory html FROM scratch as coverage-report COPY --from=cyclus-coverage /cyclus / From 9aafefe8fe752f57014547b3a18988852d7f1d8b Mon Sep 17 00:00:00 2001 From: bennibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Thu, 30 May 2024 09:55:30 -0500 Subject: [PATCH 2/4] final output is total_coverage.info --- docker/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7876a8a712..f93daabda5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -109,9 +109,9 @@ RUN lcov -c -d /cyclus -o initial_coverage.info --gcov-tool ${GCOV} --initial -- cyclus_unit_tests && \ cd tests && python3 -m pytest && cd .. && \ lcov -c -d /cyclus -o test_coverage.info --gcov-tool ${GCOV} --no-external && \ - lcov --add-tracefile initial_coverage.info --add-tracefile test_coverage.info -o total_coverage.info && \ - lcov --remove total_coverage.info -o filtered_coverage.info '/cyclus/build/_deps/**' - mkdir -p html && genhtml filtered_coverage.info --output-directory html + lcov --add-tracefile initial_coverage.info --add-tracefile test_coverage.info -o temp_coverage.info && \ + lcov --remove temp_coverage.info -o total_coverage.info '/cyclus/build/_deps/**' + mkdir -p html && genhtml total_coverage.info --output-directory html FROM scratch as coverage-report COPY --from=cyclus-coverage /cyclus / From f29f0aebc10f83a42cbf8491e1f17281f114935a Mon Sep 17 00:00:00 2001 From: bennibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Thu, 30 May 2024 10:13:16 -0500 Subject: [PATCH 3/4] update CHANGELOG --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6d7fb4ff01..71439ccb7a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -21,7 +21,10 @@ Since last release * Removed the ResourceBuff class and replaced its instances with ResBuf (#1755) **Fixed:** + * Removed unnecessary records being added to the Resource database by packaging process (#1761) +* Removed GTest source code from code coverage reports (#1759) + v1.6.0 ==================== From 8265d8b2709a9c32cba934cbb433db1c41ed9431 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Thu, 30 May 2024 10:17:08 -0500 Subject: [PATCH 4/4] Forgot && \ --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index f93daabda5..725d356d9d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -110,7 +110,7 @@ RUN lcov -c -d /cyclus -o initial_coverage.info --gcov-tool ${GCOV} --initial -- cd tests && python3 -m pytest && cd .. && \ lcov -c -d /cyclus -o test_coverage.info --gcov-tool ${GCOV} --no-external && \ lcov --add-tracefile initial_coverage.info --add-tracefile test_coverage.info -o temp_coverage.info && \ - lcov --remove temp_coverage.info -o total_coverage.info '/cyclus/build/_deps/**' + lcov --remove temp_coverage.info -o total_coverage.info '/cyclus/build/_deps/**' && \ mkdir -p html && genhtml total_coverage.info --output-directory html FROM scratch as coverage-report