Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: improve test jenkins error reporting #10145

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
14 changes: 14 additions & 0 deletions contrib/test_jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,19 @@ run_tests() {
do_distributed_task 0 4 run_nt_buffer_transfer_tests
}

error_handler() {
set +x
local exit_code=$?
local test_name="$1"
local flag="$2"

azure_log_error "$test_name failed"
azure_log_error "To debug, rerun with: $flag $0"
exit $exit_code
}

run_test_proto_disable() {
trap 'error_handler "Proto V1 test" "PROTO_ENABLE=no"' ERR
# build for devel tests and gtest
build devel --enable-gtest

Expand All @@ -1130,11 +1142,13 @@ run_test_proto_disable() {
}

run_asan_check() {
trap 'error_handler "AddressSanitizer check" "ASAN_CHECK=yes"' ERR
build devel --enable-gtest --enable-asan --without-valgrind
run_gtest "default"
}

run_valgrind_check() {
trap 'error_handler "Valgrind check" "VALGRIND_CHECK=yes"' ERR
if [[ $(uname -m) =~ "aarch" ]] || [[ $(uname -m) =~ "ppc" ]]; then
echo "==== Skip valgrind tests on `uname -m` ===="
return
Expand Down
Loading