summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-10-10 14:34:00 -0700
committerJunio C Hamano <gitster@pobox.com>2022-10-10 14:34:00 -0700
commit244d1719af1ee07beccaf13a7de9b7d5e4bb0e29 (patch)
tree71d0b3668530565376c36a514b6bb59f201b74c1
parent82f56fe383c1c71f3107b6b0f24ad9786afd079c (diff)
downloadgit-244d1719af1ee07beccaf13a7de9b7d5e4bb0e29.tar.gz
Meta/Dothem: optionally run various sanitizer tests with --san option
-rwxr-xr-xDothem14
1 files changed, 13 insertions, 1 deletions
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 &&