Skip to content

Commit

Permalink
wip skip sanitizers centos
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlee committed Dec 31, 2022
1 parent 2c16b3f commit 30c6b07
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/shell/bazel/cc_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1858,7 +1858,21 @@ EOF
fi
}

# sanitizer features are opt-in so we check if the sanitizer library is
# installed and skip the test if it isn't (e.g. centos-7-openjdk-11-gcc-10)
function __is_installed() {
local lib="$1"

if [[ "$(uname -s | tr 'A-Z' 'a-z')" == "linux" ]]; then
return $(ldconfig -p | grep -q "$lib")
fi

# assume installed for darwin
}

function test_cc_toolchain_asan_feature() {
__is_installed "libasan" || return 0

mkdir pkg
cat > pkg/BUILD <<EOF
cc_binary(
Expand Down Expand Up @@ -1889,6 +1903,8 @@ EOF
}

function test_cc_toolchain_tsan_feature() {
__is_installed "libtsan" || return 0

mkdir pkg
cat > pkg/BUILD <<EOF
cc_binary(
Expand Down Expand Up @@ -1922,6 +1938,8 @@ EOF
}

function test_cc_toolchain_ubsan_feature() {
__is_installed "libubsan" || return 0

mkdir pkg
cat > pkg/BUILD <<EOF
cc_binary(
Expand Down

0 comments on commit 30c6b07

Please sign in to comment.