mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-15 23:34:56 -04:00
scripts/run_tests.sh: add ASAN tests
This commit is contained in:
parent
3b12acdf32
commit
3b4a590f10
@ -47,14 +47,20 @@ jobs:
|
|||||||
- dist: xenial
|
- dist: xenial
|
||||||
compiler: clang
|
compiler: clang
|
||||||
arch: arm64
|
arch: arm64
|
||||||
|
# ASAN fails with internal error
|
||||||
|
env: DISABLE_ASAN=1
|
||||||
|
|
||||||
- dist: xenial
|
- dist: xenial
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
arch: ppc64le
|
arch: ppc64le
|
||||||
|
# ASAN fails with internal error
|
||||||
|
env: DISABLE_ASAN=1
|
||||||
|
|
||||||
- dist: xenial
|
- dist: xenial
|
||||||
compiler: clang
|
compiler: clang
|
||||||
arch: ppc64le
|
arch: ppc64le
|
||||||
|
# ASAN fails with internal error
|
||||||
|
env: DISABLE_ASAN=1
|
||||||
|
|
||||||
- dist: xenial
|
- dist: xenial
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
@ -35,6 +35,13 @@ CC_VERSION=$($CC --version | head -1)
|
|||||||
|
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
|
|
||||||
|
# Allow setting DISABLE_ASAN=1 in the environment to disable the ASAN tests.
|
||||||
|
if [ "${DISABLE_ASAN:-}" = "1" ]; then
|
||||||
|
DISABLE_ASAN=true
|
||||||
|
else
|
||||||
|
DISABLE_ASAN=false
|
||||||
|
fi
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
INDENT=0
|
INDENT=0
|
||||||
@ -250,6 +257,17 @@ run_tests() {
|
|||||||
log "Skipping UBSAN tests because compiler ($CC_VERSION) doesn't support UBSAN"
|
log "Skipping UBSAN tests because compiler ($CC_VERSION) doesn't support UBSAN"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cflags=("-fsanitize=address" "-fno-sanitize-recover=address")
|
||||||
|
if $DISABLE_ASAN; then
|
||||||
|
log "Skipping ASAN tests because DISABLE_ASAN=1 was set"
|
||||||
|
elif cflags_supported "${cflags[@]}"; then
|
||||||
|
begin "Running tests with ASAN"
|
||||||
|
CFLAGS="$CFLAGS ${cflags[*]}" do_run_tests --quick
|
||||||
|
end
|
||||||
|
else
|
||||||
|
log "Skipping ASAN tests because compiler ($CC_VERSION) doesn't support ASAN"
|
||||||
|
fi
|
||||||
|
|
||||||
install_uninstall_tests
|
install_uninstall_tests
|
||||||
check_symbol_prefixes
|
check_symbol_prefixes
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user