]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/Dothem: drive --meson
authorJunio C Hamano <gitster@pobox.com>
Thu, 17 Apr 2025 21:27:39 +0000 (14:27 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 18 Apr 2025 00:09:06 +0000 (17:09 -0700)
Dothem
loop-rebuild

diff --git a/Dothem b/Dothem
index cd798b8637964f8602d8c35403cd9d868eaf18c4..e59c492e684b7f58abde2f96e29ef34f7c2500cd 100755 (executable)
--- a/Dothem
+++ b/Dothem
@@ -4,8 +4,10 @@ NWD=contrib/workdir/git-new-workdir
 MASTER=master
 
 section () {
+       printf "\033]0;%s %s\007" "$branch" "$*"
+
        printf "\n\n\n"
-       printf "############ %s\n" "$@"
+       printf "############ %s %s\n" "$branch" "$*"
        printf "\n\n\n"
 }
 
@@ -24,7 +26,7 @@ inst_prefix=$(
 )
 
 force= with_dash= test_long= M= install= doc= notest= bootstrap= branches= jobs=
-scratch= noprove= memtrash=--memtrash with_cocci= with_leaks= with_sha256= san= clean=
+scratch= noprove= memtrash=--memtrash with_cocci= with_leaks= with_sha256= san= clean= with_meson=
 while  case "$1" in
        --pedantic | --locale=* | --loose) M="$M $1" ;;
        --force) force=$1 ;;
@@ -49,6 +51,7 @@ while case "$1" in
        --san) san=t ;;
        --leaks) with_leaks=t ;;
        --sha256) with_sha256=t ;;
+       --meson) with_meson=t ;;
        -j*) jobs=$1 ;;
        --) shift; break ;;
        -*) echo >&2 "Unknown option: $1"; exit 1 ;;
@@ -152,9 +155,6 @@ do
                }
        fi
 
-       private=$(git rev-parse -q --verify private-$branch 2>/dev/null)
-       case $? in 0|1) ;; *) exit $? ;; esac
-
        version=$(find_installed $branch)
        if      test "z$version" = "z$revision"
        then
@@ -162,6 +162,9 @@ do
                test -n "$force" || continue
        fi
 
+       private=$(git rev-parse -q --verify private-$branch 2>/dev/null)
+       case $? in 0|1) ;; *) exit $? ;; esac
+
        vtree=$(git rev-parse --verify "$version^{tree}")
        rtree=$(git rev-parse --verify "$revision^{tree}")
        (
@@ -237,6 +240,18 @@ do
 
                save=$(git rev-parse HEAD) &&
 
+               if test -n "$with_meson" && test -f "meson.build"
+               then
+                       section meson
+                       rm -fr "../.$branch.boson" &&
+                       meson setup "../.$branch.boson" &&
+                       (
+                               cd "../.$branch.boson" &&
+                               meson compile &&
+                               meson test
+                       ) || exit $?
+               fi &&
+
                # cocci
                if test -n "$with_cocci"
                then
@@ -312,7 +327,7 @@ do
                        if test "$save" = "$(git rev-parse HEAD)"
                        then
                                section install
-                               Meta/Make $M -- ${with_dash:+SHELL_PATH=/bin/dash} "$@" install
+                               Meta/Make $jobs $M -- ${with_dash:+SHELL_PATH=/bin/dash} "$@" install
                        else
                                echo >&2 "Head moved--not installing"
                        fi
index 82d3dafd548908ec2f0ea515b2bf26e527085b68..c470bb0e494c4dea21bd1f28883abb9b7d895ac9 100755 (executable)
@@ -10,6 +10,8 @@ stamp () {
        Meta/V 2>/dev/null | sha1sum
 }
 
+export CC=clang
+
 P=previous
 O=observed
 while :
@@ -19,8 +21,12 @@ do
                ssleep 300
        done
        ssleep 30
-       # opts --sha256 --leaks --san
-       time nice -20 Meta/Dothem -j32 --dash -- -- CC=clang; uptime; date
+
+       time nice -20 Meta/Dothem -j32 --meson --dash \
+               --sha256 --leaks --san \
+               CC=clang
+
+       uptime; date
        P=$(stamp)
        Meta/V
 done