Meta/Dothem: drive --meson

Junio C Hamano committed Apr 17, 2025 at 14:27 UTC 5dbd936032bb6b11c7f3e3280da0af7d8cdb1b29
2 files changed +29 -8
Dothem
+21 -6
@@ -4,8 +4,10 @@ NWD=contrib/workdir/git-new-workdir
4 MASTER=master
5
6 section () {
7 + printf "\033]0;%s %s\007" "$branch" "$*"
8 +
9 printf "\n\n\n"
8 - printf "############ %s\n" "$@"
10 + printf "############ %s %s\n" "$branch" "$*"
11 printf "\n\n\n"
12 }
13
@@ -24,7 +26,7 @@ inst_prefix=$(
26 )
27
28 force= with_dash= test_long= M= install= doc= notest= bootstrap= branches= jobs=
27 -scratch= noprove= memtrash=--memtrash with_cocci= with_leaks= with_sha256= san= clean=
29 +scratch= noprove= memtrash=--memtrash with_cocci= with_leaks= with_sha256= san= clean= with_meson=
30 while case "$1" in
31 --pedantic | --locale=* | --loose) M="$M $1" ;;
32 --force) force=$1 ;;
@@ -49,6 +51,7 @@ while case "$1" in
51 --san) san=t ;;
52 --leaks) with_leaks=t ;;
53 --sha256) with_sha256=t ;;
54 + --meson) with_meson=t ;;
55 -j*) jobs=$1 ;;
56 --) shift; break ;;
57 -*) echo >&2 "Unknown option: $1"; exit 1 ;;
@@ -152,9 +155,6 @@ do
155 }
156 fi
157
155 - private=$(git rev-parse -q --verify private-$branch 2>/dev/null)
156 - case $? in 0|1) ;; *) exit $? ;; esac
157 -
158 version=$(find_installed $branch)
159 if test "z$version" = "z$revision"
160 then
@@ -162,6 +162,9 @@ do
162 test -n "$force" || continue
163 fi
164
165 + private=$(git rev-parse -q --verify private-$branch 2>/dev/null)
166 + case $? in 0|1) ;; *) exit $? ;; esac
167 +
168 vtree=$(git rev-parse --verify "$version^{tree}")
169 rtree=$(git rev-parse --verify "$revision^{tree}")
170 (
@@ -237,6 +240,18 @@ do
240
241 save=$(git rev-parse HEAD) &&
242
243 + if test -n "$with_meson" && test -f "meson.build"
244 + then
245 + section meson
246 + rm -fr "../.$branch.boson" &&
247 + meson setup "../.$branch.boson" &&
248 + (
249 + cd "../.$branch.boson" &&
250 + meson compile &&
251 + meson test
252 + ) || exit $?
253 + fi &&
254 +
255 # cocci
256 if test -n "$with_cocci"
257 then
@@ -312,7 +327,7 @@ do
327 if test "$save" = "$(git rev-parse HEAD)"
328 then
329 section install
315 - Meta/Make $M -- ${with_dash:+SHELL_PATH=/bin/dash} "$@" install
330 + Meta/Make $jobs $M -- ${with_dash:+SHELL_PATH=/bin/dash} "$@" install
331 else
332 echo >&2 "Head moved--not installing"
333 fi
loop-rebuild
+8 -2
@@ -10,6 +10,8 @@ stamp () {
10 Meta/V 2>/dev/null | sha1sum
11 }
12
13 +export CC=clang
14 +
15 P=previous
16 O=observed
17 while :
@@ -19,8 +21,12 @@ do
21 ssleep 300
22 done
23 ssleep 30
22 - # opts --sha256 --leaks --san
23 - time nice -20 Meta/Dothem -j32 --dash -- -- CC=clang; uptime; date
24 +
25 + time nice -20 Meta/Dothem -j32 --meson --dash \
26 + --sha256 --leaks --san \
27 + CC=clang
28 +
29 + uptime; date
30 P=$(stamp)
31 Meta/V
32 done