tools/ci.sh: Add functions for sanitizer builds.
Includes both undefined and address sanitizer configurations. Signed-off-by: Jeff Epler <jepler@gmail.com>
This commit is contained in:
committed by
Damien George
parent
2c8ccd3ee8
commit
268264fe64
34
tools/ci.sh
34
tools/ci.sh
@@ -512,6 +512,18 @@ CI_UNIX_OPTS_QEMU_RISCV64=(
|
|||||||
MICROPY_STANDALONE=1
|
MICROPY_STANDALONE=1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
CI_UNIX_OPTS_SANITIZE_ADDRESS=(
|
||||||
|
VARIANT=coverage
|
||||||
|
CFLAGS_EXTRA="-fsanitize=address"
|
||||||
|
LDFLAGS_EXTRA="-fsanitize=address"
|
||||||
|
)
|
||||||
|
|
||||||
|
CI_UNIX_OPTS_SANITIZE_UNDEFINED=(
|
||||||
|
VARIANT=coverage
|
||||||
|
CFLAGS_EXTRA="-fsanitize=undefined -fno-sanitize=nonnull-attribute"
|
||||||
|
LDFLAGS_EXTRA="-fsanitize=undefined -fno-sanitize=nonnull-attribute"
|
||||||
|
)
|
||||||
|
|
||||||
function ci_unix_build_helper {
|
function ci_unix_build_helper {
|
||||||
make ${MAKEOPTS} -C mpy-cross
|
make ${MAKEOPTS} -C mpy-cross
|
||||||
make ${MAKEOPTS} -C ports/unix "$@" submodules
|
make ${MAKEOPTS} -C ports/unix "$@" submodules
|
||||||
@@ -742,6 +754,28 @@ function ci_unix_settrace_stackless_run_tests {
|
|||||||
ci_unix_run_tests_full_helper standard "${CI_UNIX_OPTS_SYS_SETTRACE_STACKLESS[@]}"
|
ci_unix_run_tests_full_helper standard "${CI_UNIX_OPTS_SYS_SETTRACE_STACKLESS[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ci_unix_sanitize_undefined_build {
|
||||||
|
make ${MAKEOPTS} -C mpy-cross
|
||||||
|
make ${MAKEOPTS} -C ports/unix submodules
|
||||||
|
make ${MAKEOPTS} -C ports/unix "${CI_UNIX_OPTS_SANITIZE_UNDEFINED[@]}"
|
||||||
|
ci_unix_build_ffi_lib_helper gcc
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_unix_sanitize_undefined_run_tests {
|
||||||
|
ci_unix_run_tests_full_helper coverage "${CI_UNIX_OPTS_SANITIZE_UNDEFINED[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_unix_sanitize_address_build {
|
||||||
|
make ${MAKEOPTS} -C mpy-cross
|
||||||
|
make ${MAKEOPTS} -C ports/unix submodules
|
||||||
|
make ${MAKEOPTS} -C ports/unix "${CI_UNIX_OPTS_SANITIZE_ADDRESS[@]}"
|
||||||
|
ci_unix_build_ffi_lib_helper gcc
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_unix_sanitize_address_run_tests {
|
||||||
|
ci_unix_run_tests_full_helper coverage "${CI_UNIX_OPTS_SANITIZE_ADDRESS[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
function ci_unix_macos_build {
|
function ci_unix_macos_build {
|
||||||
make ${MAKEOPTS} -C mpy-cross
|
make ${MAKEOPTS} -C mpy-cross
|
||||||
make ${MAKEOPTS} -C ports/unix submodules
|
make ${MAKEOPTS} -C ports/unix submodules
|
||||||
|
|||||||
Reference in New Issue
Block a user