Skip to content

Commit 5dbd936

Browse files
committed
Meta/Dothem: drive --meson
1 parent f438db7 commit 5dbd936

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

Dothem

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ NWD=contrib/workdir/git-new-workdir
44
MASTER=master
55

66
section () {
7+
printf "\033]0;%s %s\007" "$branch" "$*"
8+
79
printf "\n\n\n"
8-
printf "############ %s\n" "$@"
10+
printf "############ %s %s\n" "$branch" "$*"
911
printf "\n\n\n"
1012
}
1113

@@ -24,7 +26,7 @@ inst_prefix=$(
2426
)
2527

2628
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=
2830
while case "$1" in
2931
--pedantic | --locale=* | --loose) M="$M $1" ;;
3032
--force) force=$1 ;;
@@ -49,6 +51,7 @@ while case "$1" in
4951
--san) san=t ;;
5052
--leaks) with_leaks=t ;;
5153
--sha256) with_sha256=t ;;
54+
--meson) with_meson=t ;;
5255
-j*) jobs=$1 ;;
5356
--) shift; break ;;
5457
-*) echo >&2 "Unknown option: $1"; exit 1 ;;
@@ -152,16 +155,16 @@ do
152155
}
153156
fi
154157

155-
private=$(git rev-parse -q --verify private-$branch 2>/dev/null)
156-
case $? in 0|1) ;; *) exit $? ;; esac
157-
158158
version=$(find_installed $branch)
159159
if test "z$version" = "z$revision"
160160
then
161161
echo "* up-to-date version is already installed from $branch"
162162
test -n "$force" || continue
163163
fi
164164

165+
private=$(git rev-parse -q --verify private-$branch 2>/dev/null)
166+
case $? in 0|1) ;; *) exit $? ;; esac
167+
165168
vtree=$(git rev-parse --verify "$version^{tree}")
166169
rtree=$(git rev-parse --verify "$revision^{tree}")
167170
(
@@ -237,6 +240,18 @@ do
237240

238241
save=$(git rev-parse HEAD) &&
239242

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+
240255
# cocci
241256
if test -n "$with_cocci"
242257
then
@@ -312,7 +327,7 @@ do
312327
if test "$save" = "$(git rev-parse HEAD)"
313328
then
314329
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
316331
else
317332
echo >&2 "Head moved--not installing"
318333
fi

loop-rebuild

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ stamp () {
1010
Meta/V 2>/dev/null | sha1sum
1111
}
1212

13+
export CC=clang
14+
1315
P=previous
1416
O=observed
1517
while :
@@ -19,8 +21,12 @@ do
1921
ssleep 300
2022
done
2123
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
2430
P=$(stamp)
2531
Meta/V
2632
done

0 commit comments

Comments
 (0)