68 lines
1.2 KiB
Bash
Executable File
68 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# Give names of targets to use on the command line
|
|
# by default the following would *not* run
|
|
# coccicheck
|
|
# address,undefined
|
|
# test
|
|
default="sparse hdr-check check-docs sha256 leaks doc"
|
|
skip=" "
|
|
more=" "
|
|
|
|
: ${T:=""}
|
|
|
|
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 $T CC=clang test &&
|
|
SANITIZE=leak \
|
|
GIT_TEST_PASSING_SANITIZE_LEAK=true Meta/Make -j16 CC=clang 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 $T test
|
|
;;
|
|
test)
|
|
Meta/Make -j16 $T "$t"
|
|
;;
|
|
*)
|
|
Meta/Make -j16 "$t"
|
|
;;
|
|
esac &&
|
|
Meta/Make -j16 distclean >/dev/null 2>&1 || exit 1
|
|
done &&
|
|
Meta/Make -j16 distclean
|