Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Sep 29, 2024
1 parent 300d4be commit 5c15aeb
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,27 +264,29 @@ jobs:
tar
- name: Run unit tests
run: |
sudo -u devel \
-E env "PATH=$PATH" \
ctest --test-dir build/ \
--output-on-failure \
--no-tests=error \
--timeout 240 \
-j 1 |&
head -n 1000
- name: Collect coverage data
run: |
readarray -t -d '' binaries < <(find build/test/units/ -type f -executable | xargs printf '%q\0')
readarray -t -d '' profiles < <(find build/test/units/ -type f -name 'default.profraw' | xargs printf '%q\0')
mkdir profiles
for prof in "${profiles[@]}"; do
hash="$(sha256sum "$prof" | cut -f1 -d ' ')"
ln -s "$prof" "profiles/$hash.profraw"
for bin in "${binaries[@]}"; do
hash="$(sha256sum "$bin" | cut -f1 -d ' ')"
LLVM_PROFILE_FILE="$PWD/profiles/$hash.profraw"
sudo -u devel \
-E env "LLVM_PROFILE_FILE=$LLVM_PROFILE_FILE" \
"$bin"
if [ $? -ne 0 ]; then
exit 1
fi
done
- name: Collect coverage data
run: |
readarray -t -d '' binaries < <(find build/test/units/ -type f -executable | xargs printf '%q\0')
utils/devel/collect_coverage_data.py \
--output-dir coverage/ \
--prefix=profiles/ \
Expand Down

0 comments on commit 5c15aeb

Please sign in to comment.