From a109a1a56f7d5e8d2e56381435d276ac4eccc48b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 3 Jun 2012 19:08:02 -0700 Subject: [PATCH] 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. --- Dothem | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/Dothem b/Dothem index 1ba205e1c1..b42bc76fb9 100755 --- a/Dothem +++ b/Dothem @@ -42,7 +42,7 @@ for TRASH in /dev/shm /tmp "" do if test -n "$TRASH" && test -d "$TRASH" && test -w "$TRASH" then - TRASH="--root=$TRASH/testpen" + TRASH="--root=$(cd "$TRASH/testpen" && /bin/pwd)" break fi done @@ -132,32 +132,38 @@ do vtree=$(git rev-parse --verify "$version^{tree}") rtree=$(git rev-parse --verify "$revision^{tree}") ( - skip_test=$notest - case "$installed_source_trees" in - *" $rtree "*) - skip_test=1 + skip_test=$notest skip_doc=$nodoc + case "$force" in + ?*) ;; - esac - if test "z$vtree" = "z$rtree" - then - skip_test=1 - nodoc=1 - fi - dvtree=$(git rev-parse --verify "$version:Documentation/") - drtree=$(git rev-parse --verify "$revision:Documentation/") - if test "z$dvtree" = "z$drtree" - then - nodoc=1 - fi - case "$branch, $branches " in - jch,*' next '*) - if git diff --quiet --exit-code jch next + '') + case "$installed_source_trees" in + *" $rtree "*) + skip_test=1 + ;; + esac + if test "z$vtree" = "z$rtree" then skip_test=1 + skip_doc=1 fi + dvtree=$(git rev-parse --verify "$version:Documentation/") + drtree=$(git rev-parse --verify "$revision:Documentation/") + if test "z$dvtree" = "z$drtree" + then + skip_doc=1 + fi + case "$branch, $branches " in + jch,*' next '*) + if git diff --quiet --exit-code jch next + then + skip_test=1 + fi + ;; + esac ;; esac - test $(git rev-parse --verify "$version^{tree}" 2>/dev/null) + case "$skip_test" in ?*) dotest= ;; '') dotest=test ;; @@ -197,7 +203,7 @@ do Meta/Make $M ${test+"$test"} $jobs -- ${with_dash:+SHELL_PATH=/bin/dash} $dotest && { - test -n "$nodoc" || + test -n "$skip_doc" || if test "$save" = "$(git rev-parse HEAD)" then Meta/Make $M $jobs -- doc && -- 2.47.3