mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Merge remote-tracking branch 'origin/topic/awelzel/fix-coveralls-no-token'
* origin/topic/awelzel/fix-coveralls-no-token: coverage/lcov_html: Allow missing coveralls token
This commit is contained in:
commit
43804fa3b5
3 changed files with 34 additions and 24 deletions
11
CHANGES
11
CHANGES
|
@ -1,3 +1,14 @@
|
||||||
|
7.0.0-dev.407 | 2024-06-26 13:16:10 +0200
|
||||||
|
|
||||||
|
* coverage/lcov_html: Allow missing coveralls token (Arne Welzel, Corelight)
|
||||||
|
|
||||||
|
This is a fixup for 0cd023b83919fca7bfac55e75a41f724e820fd26 which
|
||||||
|
currently causes ASAN coverage builds to fail for non-master branches
|
||||||
|
when due to a missing COVERALLS_REPO_TOKEN.
|
||||||
|
|
||||||
|
Instead of bailing out for non-master branches, pass `--dry-run` to the
|
||||||
|
coveralls-lcov invocation to test more of the script.
|
||||||
|
|
||||||
7.0.0-dev.405 | 2024-06-25 13:35:41 +0200
|
7.0.0-dev.405 | 2024-06-25 13:35:41 +0200
|
||||||
|
|
||||||
* Bump auxil/spicy to latest development snapshot (Benjamin Bannier, Corelight)
|
* Bump auxil/spicy to latest development snapshot (Benjamin Bannier, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
7.0.0-dev.405
|
7.0.0-dev.407
|
||||||
|
|
|
@ -36,14 +36,14 @@ Usage: $0 <options>
|
||||||
repo.
|
repo.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--help Display this output.
|
--help Display this output.
|
||||||
--html DIR This is the default mode, but this argument can be passed
|
--html DIR This is the default mode, but this argument can be passed
|
||||||
to make it explicit. It also can be used to pass an optional
|
to make it explicit. It also can be used to pass an optional
|
||||||
destination directory for the HTML output.
|
destination directory for the HTML output.
|
||||||
--coveralls TOKEN Report coverage data to Coveralls.io using the specified
|
--coveralls [TOKEN] Report coverage data to Coveralls.io using the specified
|
||||||
repo token. Enabling this option disables the HTML report.
|
repo token. Enabling this option disables the HTML report.
|
||||||
This option requires the coveralls-lcov Ruby gem to be
|
This option requires the coveralls-lcov Ruby gem to be
|
||||||
installed.
|
installed. If TOKEN is empty, uses --dry-run mode.
|
||||||
"
|
"
|
||||||
|
|
||||||
echo "${usage}"
|
echo "${usage}"
|
||||||
|
@ -63,15 +63,14 @@ while (("$#")); do
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
--coveralls)
|
--coveralls)
|
||||||
if [ ${#2} -eq 0 ]; then
|
|
||||||
echo "ERROR: Coveralls repo token must be passed with --coveralls argument."
|
|
||||||
echo
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
HTML_REPORT=0
|
HTML_REPORT=0
|
||||||
COVERALLS_REPO_TOKEN=$2
|
if [ ${#2} -eq 0 ]; then
|
||||||
shift 2
|
echo "WARN: No coveralls token, running coveralls-lcov --dry-run."
|
||||||
|
shift 1
|
||||||
|
else
|
||||||
|
COVERALLS_REPO_TOKEN=$2
|
||||||
|
shift 2
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
--help)
|
--help)
|
||||||
usage
|
usage
|
||||||
|
@ -131,19 +130,19 @@ if [ $HTML_REPORT -eq 1 ]; then
|
||||||
echo -n "Creating HTML files... "
|
echo -n "Creating HTML files... "
|
||||||
verify_run "genhtml --ignore-errors empty -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..."
|
||||||
COVERAGE_FILE_CLEAN="${COVERAGE_FILE}.clean"
|
COVERAGE_FILE_CLEAN="${COVERAGE_FILE}.clean"
|
||||||
verify_run "testing/coverage/coverage_cleanup.py ${COVERAGE_FILE} > ${COVERAGE_FILE_CLEAN} 2>&1"
|
verify_run "testing/coverage/coverage_cleanup.py ${COVERAGE_FILE} > ${COVERAGE_FILE_CLEAN} 2>&1"
|
||||||
|
|
||||||
echo -n "Reporting to Coveralls..."
|
if [ "${CIRRUS_BRANCH}" == "master" ] && [ -n "${COVERALLS_REPO_TOKEN}" ]; then
|
||||||
coveralls_cmd="coveralls-lcov -t ${COVERALLS_REPO_TOKEN}"
|
echo -n "Reporting to Coveralls..."
|
||||||
|
coveralls_cmd="coveralls-lcov -t ${COVERALLS_REPO_TOKEN}"
|
||||||
|
else
|
||||||
|
echo "Reporting to Coveralls in --dry-run mode"
|
||||||
|
coveralls_cmd="coveralls-lcov --dry-run"
|
||||||
|
fi
|
||||||
|
|
||||||
# If we're being called by Cirrus, add some additional information to the output.
|
# If we're being called by Cirrus, add some additional information to the output.
|
||||||
if [ -n "${CIRRUS_BUILD_ID}" ]; then
|
if [ -n "${CIRRUS_BUILD_ID}" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue