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.

Junio C Hamano committed Jun 3, 2012 at 19:08 UTC a109a1a56f7d5e8d2e56381435d276ac4eccc48b
1 file changed +28 -22
Dothem
+28 -22
@@ -42,7 +42,7 @@ for TRASH in /dev/shm /tmp ""
42 do
43 if test -n "$TRASH" && test -d "$TRASH" && test -w "$TRASH"
44 then
45 - TRASH="--root=$TRASH/testpen"
45 + TRASH="--root=$(cd "$TRASH/testpen" && /bin/pwd)"
46 break
47 fi
48 done
@@ -132,32 +132,38 @@ do
132 vtree=$(git rev-parse --verify "$version^{tree}")
133 rtree=$(git rev-parse --verify "$revision^{tree}")
134 (
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 + ?*)
138 ;;
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"
146 then
147 skip_test=1
148 + skip_doc=1
149 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
164 ;;
165 esac
160 - test $(git rev-parse --verify "$version^{tree}" 2>/dev/null)
166 +
167 case "$skip_test" in
168 ?*) dotest= ;;
169 '') dotest=test ;;
@@ -197,7 +203,7 @@ do
203 Meta/Make $M ${test+"$test"} $jobs -- ${with_dash:+SHELL_PATH=/bin/dash} $dotest &&
204
205 {
200 - test -n "$nodoc" ||
206 + test -n "$skip_doc" ||
207 if test "$save" = "$(git rev-parse HEAD)"
208 then
209 Meta/Make $M $jobs -- doc &&