aboutsummaryrefslogtreecommitdiffstats
path: root/round
blob: 9912ba83877782ce588450df497e7292bbca56ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/sh

# Give names of targets to use on the command line
# coccicheck and address,undefined are not enabled by default
default="sparse hdr-check sha256 leaks 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