blob: 462919aafc8d8aab96f6c6e3bf732d2a80af3d4f [file] [log] [blame]
#!/bin/sh
# Give names of targets to use on the command line
# coccicheck is not enabled by default
default="sparse hdr-check sha256 leaks address,undefined test check-docs doc"
skip=" "
more=" "
for t
do
case "$t" in
-) default= ;;
-?*) skip="$skip${t#-} " ;;
?*) more="$more$t " ;;
esac
done
set -- $default $more
for t
do
echo "----- >8 -----" >&2
case "$skip" in
*" $t "*)
echo "Skipping $t" >&2
continue ;;
esac
echo "Running $t" >&2
case "$t" in
address | undefined | address,undefined)
SANITIZE=$t \
Meta/Make -j16 test
;;
leaks)
SANITIZE=leak \
GIT_TEST_PASSING_SANITIZE_LEAK=true Meta/Make -j16 test &&
SANITIZE=leak \
GIT_TEST_PASSING_SANITIZE_LEAK=true Meta/Make -j16 clean
;;
coccicheck)
SPATCH_FLAGS=--recursive-includes Meta/Make -j16 "$t"
;;
sparse)
Meta/Make -j16 -- NO_REGEX=NoThanks SPARSE_FLAGS=-Wsparse-error "$t" &&
Meta/Make -j16 -- NO_REGEX=NoThanks clean >/dev/null 2>&1 &&
rm -f compat/regex/regex.o
;;
sha256)
GIT_TEST_DEFAULT_HASH=sha256 Meta/Make -j16 test
;;
*)
Meta/Make -j16 "$t"
;;
esac &&
Meta/Make -j16 distclean >/dev/null 2>&1 || exit 1
done &&
Meta/Make -j16 distclean