mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/timw/fix-coverage-part-deux'
* origin/topic/timw/fix-coverage-part-deux: CI: Remove --enable-werror for asan builds CI: Run coverage builds for PRs, but only upload on master Coverage: Ignore a few errors during generation Coverage: don't bother ignoring non-existent bro.dir files CI: Re-enable coverage CI: Switch asan build back to gcc Update cmake submodule [nomail] CI: Avoid divide by zero error when generating coverage files
This commit is contained in:
commit
afc89c0480
7 changed files with 42 additions and 17 deletions
|
@ -14,7 +14,7 @@ config: &CONFIG --build-type=release --disable-broker-tests --prefix=$CIRRUS_WOR
|
||||||
no_spicy_config: &NO_SPICY_CONFIG --build-type=release --disable-broker-tests --disable-spicy --prefix=$CIRRUS_WORKING_DIR/install --ccache --enable-werror
|
no_spicy_config: &NO_SPICY_CONFIG --build-type=release --disable-broker-tests --disable-spicy --prefix=$CIRRUS_WORKING_DIR/install --ccache --enable-werror
|
||||||
static_config: &STATIC_CONFIG --build-type=release --disable-broker-tests --enable-static-broker --enable-static-binpac --prefix=$CIRRUS_WORKING_DIR/install --ccache --enable-werror
|
static_config: &STATIC_CONFIG --build-type=release --disable-broker-tests --enable-static-broker --enable-static-binpac --prefix=$CIRRUS_WORKING_DIR/install --ccache --enable-werror
|
||||||
binary_config: &BINARY_CONFIG --prefix=$CIRRUS_WORKING_DIR/install --libdir=$CIRRUS_WORKING_DIR/install/lib --binary-package --enable-static-broker --enable-static-binpac --disable-broker-tests --build-type=Release --ccache --enable-werror
|
binary_config: &BINARY_CONFIG --prefix=$CIRRUS_WORKING_DIR/install --libdir=$CIRRUS_WORKING_DIR/install/lib --binary-package --enable-static-broker --enable-static-binpac --disable-broker-tests --build-type=Release --ccache --enable-werror
|
||||||
asan_sanitizer_config: &ASAN_SANITIZER_CONFIG --build-type=debug --disable-broker-tests --sanitizers=address --enable-fuzzers --enable-coverage --disable-spicy --ccache --enable-werror
|
asan_sanitizer_config: &ASAN_SANITIZER_CONFIG --build-type=debug --disable-broker-tests --sanitizers=address --enable-fuzzers --enable-coverage --disable-spicy --ccache
|
||||||
ubsan_sanitizer_config: &UBSAN_SANITIZER_CONFIG --build-type=debug --disable-broker-tests --sanitizers=undefined --enable-fuzzers --disable-spicy --ccache --enable-werror
|
ubsan_sanitizer_config: &UBSAN_SANITIZER_CONFIG --build-type=debug --disable-broker-tests --sanitizers=undefined --enable-fuzzers --disable-spicy --ccache --enable-werror
|
||||||
tsan_sanitizer_config: &TSAN_SANITIZER_CONFIG --build-type=debug --disable-broker-tests --sanitizers=thread --enable-fuzzers --disable-spicy --ccache --enable-werror
|
tsan_sanitizer_config: &TSAN_SANITIZER_CONFIG --build-type=debug --disable-broker-tests --sanitizers=thread --enable-fuzzers --disable-spicy --ccache --enable-werror
|
||||||
|
|
||||||
|
@ -392,10 +392,8 @@ asan_sanitizer_task:
|
||||||
|
|
||||||
<< : *CI_TEMPLATE
|
<< : *CI_TEMPLATE
|
||||||
test_fuzzers_script: ./ci/test-fuzzers.sh
|
test_fuzzers_script: ./ci/test-fuzzers.sh
|
||||||
# coverage_script: ./ci/upload-coverage.sh
|
coverage_script: ./ci/upload-coverage.sh
|
||||||
env:
|
env:
|
||||||
CC: clang-18
|
|
||||||
CXX: clang++-18
|
|
||||||
CXXFLAGS: -DZEEK_DICT_DEBUG
|
CXXFLAGS: -DZEEK_DICT_DEBUG
|
||||||
ZEEK_CI_CONFIGURE_FLAGS: *ASAN_SANITIZER_CONFIG
|
ZEEK_CI_CONFIGURE_FLAGS: *ASAN_SANITIZER_CONFIG
|
||||||
ASAN_OPTIONS: detect_leaks=1:detect_odr_violation=0
|
ASAN_OPTIONS: detect_leaks=1:detect_odr_violation=0
|
||||||
|
|
25
CHANGES
25
CHANGES
|
@ -1,3 +1,28 @@
|
||||||
|
7.0.0-dev.280 | 2024-05-21 16:22:57 -0700
|
||||||
|
|
||||||
|
* CI: Remove --enable-werror for asan builds (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
There's a bug in GCC (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562) that
|
||||||
|
causes std::regex to emit some warnings when built with -fsanitize=address. Any
|
||||||
|
warnings that actually mean anything would be caught by the other sanitizer
|
||||||
|
builds or by the regular ubuntu24 build.
|
||||||
|
|
||||||
|
* CI: Run coverage builds for PRs, but only upload on master (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
* Coverage: Ignore a few errors during generation (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
* Coverage: don't bother ignoring non-existent bro.dir files (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
* CI: Re-enable coverage (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
* CI: Switch asan build back to gcc (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
The tools used for coverage (gcov, lcov) work better with GCC. We could switch
|
||||||
|
over to similar tools for llvm, but they way they store files during coverage
|
||||||
|
builds don't work as well for us (mostly the places they store the files).
|
||||||
|
|
||||||
|
* CI: Avoid divide by zero error when generating coverage files (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
7.0.0-dev.270 | 2024-05-20 15:54:09 -0700
|
7.0.0-dev.270 | 2024-05-20 15:54:09 -0700
|
||||||
|
|
||||||
* Fix for suppressing SMB logging of previously-logged files (Vern Paxson, Corelight)
|
* Fix for suppressing SMB logging of previously-logged files (Vern Paxson, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
7.0.0-dev.270
|
7.0.0-dev.280
|
||||||
|
|
|
@ -11,11 +11,6 @@ if [ "${CIRRUS_REPO_FULL_NAME}" != "zeek/zeek" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${CIRRUS_BRANCH}" != "master" ]; then
|
|
||||||
echo "Coverage upload skipped for non-master branches"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd testing/coverage
|
cd testing/coverage
|
||||||
make coverage
|
make coverage
|
||||||
make coveralls
|
make coveralls
|
||||||
|
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
||||||
Subproject commit 925c32db4d6d952ec43fa18a85d8bb70138b9257
|
Subproject commit 71ac5ebe5ff61eb30c8f7b2973faacc6f16f88f2
|
|
@ -90,9 +90,11 @@ function check_group_coverage {
|
||||||
TOTAL=$(echo $(grep "$i" $DATA | cut -f 3) | tr " " "+" | bc)
|
TOTAL=$(echo $(grep "$i" $DATA | cut -f 3) | tr " " "+" | bc)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PERCENTAGE=$(echo "scale=3;100*$RUN/$TOTAL" | bc | tr "\n" " ")
|
if [ $TOTAL -ne 0 ]; then
|
||||||
printf "%-50s\t%12s\t%6s %%\n" "$i" "$RUN/$TOTAL" $PERCENTAGE |
|
PERCENTAGE=$(echo "scale=3;100*$RUN/$TOTAL" | bc | tr "\n" " ")
|
||||||
sed 's|#|/|g' >>$OUTPUT
|
printf "%-50s\t%12s\t%6s %%\n" "$i" "$RUN/$TOTAL" $PERCENTAGE |
|
||||||
|
sed 's|#|/|g' >>$OUTPUT
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ fi
|
||||||
|
|
||||||
# Files and directories that will be removed from the counts in step 5. Directories
|
# Files and directories that will be removed from the counts in step 5. Directories
|
||||||
# need to be surrounded by escaped wildcards.
|
# need to be surrounded by escaped wildcards.
|
||||||
REMOVE_TARGETS="*.yy *.ll *.y *.l \*/bro.dir/\* *.bif \*/zeek.dir/\* \*/src/3rdparty/\* \*/src/zeek/3rdparty/\* \*/auxil/\* \*/build/zeek/3rdparty/\*"
|
REMOVE_TARGETS="*.yy *.ll *.y *.l *.bif \*/zeek.dir/\* \*/src/3rdparty/\* \*/src/zeek/3rdparty/\* \*/auxil/\* \*/build/zeek/3rdparty/\*"
|
||||||
|
|
||||||
# 1. Move to base dir, create tmp dir
|
# 1. Move to base dir, create tmp dir
|
||||||
cd ../../
|
cd ../../
|
||||||
|
@ -123,14 +123,19 @@ verify_run "lcov --no-external --capture --directory . --output-file $COVERAGE_F
|
||||||
# Zeek coverage numbers.
|
# Zeek coverage numbers.
|
||||||
for TARGET in $REMOVE_TARGETS; do
|
for TARGET in $REMOVE_TARGETS; do
|
||||||
echo -n "Getting rid of $TARGET files from tracefile... "
|
echo -n "Getting rid of $TARGET files from tracefile... "
|
||||||
verify_run "lcov --remove $COVERAGE_FILE $TARGET --output-file $COVERAGE_FILE"
|
verify_run "lcov --ignore-errors unused,empty --remove $COVERAGE_FILE $TARGET --output-file $COVERAGE_FILE"
|
||||||
done
|
done
|
||||||
|
|
||||||
# 6. Create HTML files or Coveralls report
|
# 6. Create HTML files or Coveralls report
|
||||||
if [ $HTML_REPORT -eq 1 ]; then
|
if [ $HTML_REPORT -eq 1 ]; then
|
||||||
echo -n "Creating HTML files... "
|
echo -n "Creating HTML files... "
|
||||||
verify_run "genhtml -o $COVERAGE_HTML_DIR $COVERAGE_FILE"
|
verify_run "genhtml --ignore-errors empty -o $COVERAGE_HTML_DIR $COVERAGE_FILE"
|
||||||
else
|
else
|
||||||
|
if [ "${CIRRUS_BRANCH}" != "master" ]; then
|
||||||
|
echo "Coverage upload skipped for non-master branches"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# The data we send to coveralls has a lot of duplicate files in it because of the
|
# The data we send to coveralls has a lot of duplicate files in it because of the
|
||||||
# zeek symlink in the src directory. Run a script that cleans that up.
|
# zeek symlink in the src directory. Run a script that cleans that up.
|
||||||
echo -n "Cleaning coverage data for Coveralls..."
|
echo -n "Cleaning coverage data for Coveralls..."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue