Skip to content

Commit a109a1a

Browse files
committed
Meta/Dothem: honor --force
Disable "A version with the same tree already is installed somewhere" optimization when the script is run with --force. Also be careful when crafting "--root=/dev/shm/testpen" option to the test scripts; on Ubuntu, /dev/shm may be a symbolic link that points at /run/shm, and "$TRASH_DIRECTORY" and $(pwd) may not match, causing poorly written tests to fail.
1 parent 5321cb2 commit a109a1a

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

Dothem

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ for TRASH in /dev/shm /tmp ""
4242
do
4343
if test -n "$TRASH" && test -d "$TRASH" && test -w "$TRASH"
4444
then
45-
TRASH="--root=$TRASH/testpen"
45+
TRASH="--root=$(cd "$TRASH/testpen" && /bin/pwd)"
4646
break
4747
fi
4848
done
@@ -132,32 +132,38 @@ do
132132
vtree=$(git rev-parse --verify "$version^{tree}")
133133
rtree=$(git rev-parse --verify "$revision^{tree}")
134134
(
135-
skip_test=$notest
136-
case "$installed_source_trees" in
137-
*" $rtree "*)
138-
skip_test=1
135+
skip_test=$notest skip_doc=$nodoc
136+
case "$force" in
137+
?*)
139138
;;
140-
esac
141-
if test "z$vtree" = "z$rtree"
142-
then
143-
skip_test=1
144-
nodoc=1
145-
fi
146-
dvtree=$(git rev-parse --verify "$version:Documentation/")
147-
drtree=$(git rev-parse --verify "$revision:Documentation/")
148-
if test "z$dvtree" = "z$drtree"
149-
then
150-
nodoc=1
151-
fi
152-
case "$branch, $branches " in
153-
jch,*' next '*)
154-
if git diff --quiet --exit-code jch next
139+
'')
140+
case "$installed_source_trees" in
141+
*" $rtree "*)
142+
skip_test=1
143+
;;
144+
esac
145+
if test "z$vtree" = "z$rtree"
155146
then
156147
skip_test=1
148+
skip_doc=1
157149
fi
150+
dvtree=$(git rev-parse --verify "$version:Documentation/")
151+
drtree=$(git rev-parse --verify "$revision:Documentation/")
152+
if test "z$dvtree" = "z$drtree"
153+
then
154+
skip_doc=1
155+
fi
156+
case "$branch, $branches " in
157+
jch,*' next '*)
158+
if git diff --quiet --exit-code jch next
159+
then
160+
skip_test=1
161+
fi
162+
;;
163+
esac
158164
;;
159165
esac
160-
test $(git rev-parse --verify "$version^{tree}" 2>/dev/null)
166+
161167
case "$skip_test" in
162168
?*) dotest= ;;
163169
'') dotest=test ;;
@@ -197,7 +203,7 @@ do
197203
Meta/Make $M ${test+"$test"} $jobs -- ${with_dash:+SHELL_PATH=/bin/dash} $dotest &&
198204

199205
{
200-
test -n "$nodoc" ||
206+
test -n "$skip_doc" ||
201207
if test "$save" = "$(git rev-parse HEAD)"
202208
then
203209
Meta/Make $M $jobs -- doc &&

0 commit comments

Comments
 (0)