]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/round: run various build targets in turn
authorJunio C Hamano <gitster@pobox.com>
Fri, 9 Sep 2022 05:32:26 +0000 (22:32 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Sep 2022 05:32:26 +0000 (22:32 -0700)
round [new file with mode: 0755]

diff --git a/round b/round
new file mode 100755 (executable)
index 0000000..0839b69
--- /dev/null
+++ b/round
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+# Give names of targets to use on the command line
+default="sparse hdr-check coccicheck test leaks address check-docs doc"
+skip=" "
+more=" "
+
+if test $# -eq 0
+then
+       set -- $default
+else
+       for t
+       do
+               case "$t" in
+               -*) skip="$skip${t#-} " ;;
+               ?*) more="$more$t " ;;
+               esac
+       done
+       case "$more" in
+       " ")    set -- $default ;;
+       *)      set -- $more ;;
+       esac
+fi
+
+for t
+do
+       case "$skip" in
+       *" $t "*)
+               echo "Skipping $t" >&2
+               continue ;;
+       esac
+
+       case "$t" in
+       address)
+               Meta/Make -j16 distclean >/dev/null 2>&1 &&
+               SANITIZE=address \
+               Meta/Make -j16 test
+               ;;
+       leaks)
+               Meta/Make -j16 distclean >/dev/null 2>&1 &&
+               SANITIZE=leak \
+               GIT_TEST_PASSING_SANITIZE_LEAK=true Meta/Make -j16 test
+               ;;
+       coccicheck)
+               SPATCH_FLAGS=--recursive-includes Meta/Make -j16 "$t"
+               ;;
+       *)
+               SPATCH_FLAGS=--recursive-includes Meta/Make -j16 "$t"
+               ;;
+       esac || return 1
+done &&
+Meta/Make -j16 distclean