Skip to content

Commit 0b90cf1

Browse files
committed
Trim the superfluous coverage sub-directory
From `coverage/coverage` to just `coverage`.
1 parent c425fe9 commit 0b90cf1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,9 @@ jobs:
735735
# Combine all tracefiles into one. Note, ignoring inconsistencies between Clang and GCC reports :|
736736
lcov --ignore-errors inconsistent $(find artifacts -name '*.info' -type f -printf '-a %p\n') -o coverage.info
737737
# Generate the HTML report. Note, ignoring inconsistencies between Clang and GCC reports :|
738-
genhtml --ignore-errors inconsistent --no-sort --output-directory coverage/coverage coverage.info
738+
genhtml --ignore-errors inconsistent --no-sort --output-directory coverage coverage.info
739739
# Can use any of the removeHtmlDates.sh scripts here, so the Ubuntu x86-64 GCC Qt6 job's version will do.
740-
/usr/bin/env bash ./artifacts/test-results-*.x86-64.gcc.qt-6/coverage/removeHtmlDates.sh
740+
/usr/bin/env bash ./artifacts/test-results-*.x86-64.gcc.qt-6/coverage/removeHtmlDates.sh coverage
741741
# Remove build numbers from pre-releases, and remove extra build info (such as ".linux.x86-64.gcc.qt-6")
742742
# from all releases, since this coverage report is an aggregation of many build hosts.
743743
sed -i -Ee 's/(headerValue">([0-9]+\.){2}[0-9]+)(((-pre)\+[0-9]+)|(\+[0-9]+))\..*</\1\5\6</' \
@@ -747,7 +747,7 @@ jobs:
747747
uses: actions/upload-artifact@v4
748748
with:
749749
name: coverage-report
750-
path: "${{ runner.temp }}/coverage/coverage"
750+
path: "${{ runner.temp }}/coverage"
751751
if-no-files-found: error
752752
- name: Report partial-finished to Codacy
753753
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,5 @@ if (ENABLE_COVERAGE)
8686
VERBATIM
8787
WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
8888
endif()
89-
configure_file(removeHtmlDates.sh.in ${PROJECT_BINARY_DIR}/removeHtmlDates.sh)
89+
configure_file(removeHtmlDates.sh.in ${PROJECT_BINARY_DIR}/removeHtmlDates.sh @ONLY)
9090
endif()

test/removeHtmlDates.sh.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ while IFS= read -d '' -r htmlFile; do
1515
-e '/headerItem">Test:</{s/>.*:/>Project:/;n;s/>.*</>${PROJECT_NAME}</}' \
1616
-e '/headerItem">(Test )?Date:</{s/>.*:/>Version:/;n;s/>.*</>${PROJECT_VERSION}${PROJECT_VERSION_SUFFIX}</}' \
1717
"$htmlFile" < /dev/null
18-
done < <(find '${PROJECT_BINARY_DIR}/coverage/' -name '*.html' -print0)
18+
done < <(find "${1:-@PROJECT_BINARY_DIR@/coverage/}" -name '*.html' -print0)

0 commit comments

Comments
 (0)