]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/perf/run: fix bin-wrappers computation
authorDerrick Stolee <dstolee@microsoft.com>
Tue, 21 Sep 2021 15:46:12 +0000 (15:46 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Sep 2021 20:26:11 +0000 (13:26 -0700)
The GIT_TEST_INSTALLED was moved from perf-lib.sh to run in df0f5021
(perf-lib.sh: remove GIT_TEST_INSTALLED from perf-lib.sh, 2019-05-07)
and that included a change to how it inspected the existence of a
bin-wrappers directory. However, that included a typo that made the
match of bin-wrappers never work. Specifically, the assignment was

mydir_abs_wrappers="$mydir_abs_wrappers/bin-wrappers"

which uses the same variable before it is initialized. By changing it to

mydir_abs_wrappers="$mydir_abs/bin-wrappers"

We can correctly use the bin-wrappers directory.

This is critical to successfully computing performance of commands that
execute subcommands. The bin-wrappers ensure that the --exec-path is set
correctly.

Reported-by: Victoria Dye <vdye@github.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/perf/run

index d19dec258a28a85c8a54f16ece6b5e73fc247fc5..55219aa405638304411bc319cc29bb5eb2a39d0b 100755 (executable)
@@ -74,7 +74,7 @@ set_git_test_installed () {
        mydir=$1
 
        mydir_abs=$(cd $mydir && pwd)
-       mydir_abs_wrappers="$mydir_abs_wrappers/bin-wrappers"
+       mydir_abs_wrappers="$mydir_abs/bin-wrappers"
        if test -d "$mydir_abs_wrappers"
        then
                GIT_TEST_INSTALLED=$mydir_abs_wrappers