Merge branch 'km/config-grammofix' into maint
[gitweb.git] / t / perf / run
index cfd70129bb70f7ed88d999421f3bc432119233c1..c788d713ae927007866b5b73920de2674f816207 100755 (executable)
@@ -30,7 +30,13 @@ unpack_git_rev () {
 }
 build_git_rev () {
        rev=$1
-       cp ../../config.mak build/$rev/config.mak
+       for config in config.mak config.mak.autogen config.status
+       do
+               if test -e "../../$config"
+               then
+                       cp "../../$config" "build/$rev/"
+               fi
+       done
        (cd build/$rev && make $GIT_PERF_MAKE_OPTS) ||
        die "failed to build revision '$mydir'"
 }
@@ -57,6 +63,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 "$@"