Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/coverage_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
MACHINES="linux_clang_x86_64 linux_clang_haswell linux_clang_icelake" \
EXTRAS="llvm-cov" \
COV_REPORT=1 \
RACESAN=1 \
contrib/test/ci_tests.sh

- name: 'Authenticate to Google Cloud'
Expand Down
20 changes: 19 additions & 1 deletion contrib/test/ci_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ for extra in $EXTRAS; do
done
export EXTRAS

export FD_LOG_LEVEL_STDERR=3

set -x

# Build and run tests for all machines
Expand All @@ -34,7 +36,7 @@ for MACHINE in ${MACHINES[*]}; do
OBJDIR="$(make help | grep OBJDIR | awk '{print $4}')"
OBJDIRS+=( "${OBJDIR}" )
make clean --silent >/dev/null
contrib/make-j $TARGETS
contrib/make-j $TARGETS >/dev/null
if [[ "$NOTEST" != 1 ]]; then
make run-unit-test
make run-fuzz-test
Expand All @@ -50,6 +52,22 @@ for MACHINE in ${MACHINES[*]}; do
export -n MACHINE
done

if [[ "$RACESAN" == 1 ]]; then
rm -rf build/racesan
MACHINE=native CC=clang EXTRAS="$EXTRAS racesan" BUILDDIR=racesan contrib/make-j unit-test >/dev/null
mkdir -p build/racesan/cov/raw
for test in $(find build/racesan/unit-test -type f -executable -name '*racesan*'); do
LLVM_PROFILE_FILE="build/racesan/cov/raw/$(basename "$test").profraw"
export LLVM_PROFILE_FILE
"$test" --page-cnt 2 --page-sz gigantic --log-path '' >/dev/null
unset LLVM_PROFILE_FILE
if [[ "$HAS_LLVM_COV" == 1 ]]; then
MACHINE=native CC=clang EXTRAS="$EXTRAS racesan" BUILDDIR=racesan make "build/racesan/cov/cov.lcov"
fi
done
OBJDIRS+=( "build/racesan" )
fi

# Export coverage report
if [[ "$COV_REPORT" == 1 ]]; then
make dist-cov-report OBJDIRS="${OBJDIRS[*]}"
Expand Down
Loading