@@ -25,6 +25,8 @@ for extra in $EXTRAS; do
2525done
2626export EXTRAS
2727
28+ export FD_LOG_LEVEL_STDERR=3
29+
2830set -x
2931
3032# Build and run tests for all machines
@@ -34,7 +36,7 @@ for MACHINE in ${MACHINES[*]}; do
3436 OBJDIR=" $( make help | grep OBJDIR | awk ' {print $4}' ) "
3537 OBJDIRS+=( " ${OBJDIR} " )
3638 make clean --silent > /dev/null
37- contrib/make-j $TARGETS
39+ contrib/make-j $TARGETS > /dev/null
3840 if [[ " $NOTEST " != 1 ]]; then
3941 make run-unit-test
4042 make run-fuzz-test
@@ -50,6 +52,22 @@ for MACHINE in ${MACHINES[*]}; do
5052 export -n MACHINE
5153done
5254
55+ if [[ " $RACESAN " == 1 ]]; then
56+ rm -rf build/racesan
57+ MACHINE=native CC=clang EXTRAS=" $EXTRAS racesan" BUILDDIR=racesan contrib/make-j unit-test > /dev/null
58+ mkdir -p build/racesan/cov/raw
59+ for test in $( find build/racesan/unit-test -type f -executable -name ' *racesan*' ) ; do
60+ LLVM_PROFILE_FILE=" build/racesan/cov/raw/$( basename " $test " ) .profraw"
61+ export LLVM_PROFILE_FILE
62+ " $test " --page-cnt 2 --page-sz gigantic --log-path ' ' > /dev/null
63+ unset LLVM_PROFILE_FILE
64+ if [[ " $HAS_LLVM_COV " == 1 ]]; then
65+ MACHINE=native CC=clang EXTRAS=" $EXTRAS racesan" BUILDDIR=racesan make " build/racesan/cov/cov.lcov"
66+ fi
67+ done
68+ OBJDIRS+=( " build/racesan" )
69+ fi
70+
5371# Export coverage report
5472if [[ " $COV_REPORT " == 1 ]]; then
5573 make dist-cov-report OBJDIRS=" ${OBJDIRS[*]} "
0 commit comments