Merge branch 'rb/compat-poll-fix' into maint
[gitweb.git] / t / perf / run
index e8adedadfdca8549b3c4f8f8a19d383a7611f4ad..beb4acc0e428d20280a649c428da8b0b3aa5b4c6 100755 (executable)
@@ -24,6 +24,7 @@ run_one_dir () {
 
 unpack_git_rev () {
        rev=$1
+       echo "=== Unpacking $rev in build/$rev ==="
        mkdir -p build/$rev
        (cd "$(git rev-parse --show-cdup)" && git archive --format=tar $rev) |
        (cd build/$rev && tar x)
@@ -37,8 +38,16 @@ build_git_rev () {
                        cp "../../$config" "build/$rev/"
                fi
        done
-       (cd build/$rev && make $GIT_PERF_MAKE_OPTS) ||
-       die "failed to build revision '$mydir'"
+       echo "=== Building $rev ==="
+       (
+               cd build/$rev &&
+               if test -n "$GIT_PERF_MAKE_COMMAND"
+               then
+                       sh -c "$GIT_PERF_MAKE_COMMAND"
+               else
+                       make $GIT_PERF_MAKE_OPTS
+               fi
+       ) || die "failed to build revision '$mydir'"
 }
 
 run_dirs_helper () {
@@ -63,6 +72,9 @@ run_dirs_helper () {
                unset GIT_TEST_INSTALLED
        else
                GIT_TEST_INSTALLED="$mydir/bin-wrappers"
+               # Older versions of git lacked bin-wrappers; fallback to the
+               # files in the root.
+               test -d "$GIT_TEST_INSTALLED" || GIT_TEST_INSTALLED=$mydir
                export GIT_TEST_INSTALLED
        fi
        run_one_dir "$@"