From: Junio C Hamano Date: Mon, 10 Oct 2022 21:34:00 +0000 (-0700) Subject: Meta/Dothem: optionally run various sanitizer tests with --san option X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=244d1719af1ee07beccaf13a7de9b7d5e4bb0e29;p=thirdparty%2Fgit.git Meta/Dothem: optionally run various sanitizer tests with --san option --- diff --git a/Dothem b/Dothem index f5440f9da8..b195948536 100755 --- a/Dothem +++ b/Dothem @@ -18,7 +18,7 @@ inst_prefix=$( ) force= with_dash= test_long= M= install= nodoc= notest= bootstrap= branches= jobs= -scratch= noprove= memtrash=--memtrash with_cocci= +scratch= noprove= memtrash=--memtrash with_cocci= san= while case "$1" in --pedantic | --locale=* | --loose) M="$M $1" ;; --force) force=$1 ;; @@ -37,6 +37,7 @@ while case "$1" in --base=*) BUILDBASE=${1#*=} ;; --branches=*) branches=${1#*=} ;; --noprove) noprove=$1 ;; + --san) san=t ;; -j*) jobs=$1 ;; --) shift; break ;; -*) echo >&2 "Unknown option: $1"; exit 1 ;; @@ -211,6 +212,17 @@ do Meta/Make $M $jobs -- hdr-check && + case "$san" in + '') ;; + ?*) + SANITIZE=address Meta/Make $M $jobs test && + SANITIZE=undefined Meta/Make $M $jobs test && + SANITIZE=leak \ + GIT_TEST_PASSING_SANITIZE_LEAK=true Meta/Make $M $jobs test && + Meta/Make distclean >/dev/null 2>&1 + ;; + esac && + Meta/Make $M $noprove ${test+"$test"} $jobs $test_long $memtrash \ -- ${with_dash:+SHELL_PATH=/bin/dash} "$@" $dotest &&