diff mbox series

[1/1] tests: explicitly use `test-tool.exe` on Windows

Message ID f396aa113ac3c50ca6a2402cedc71a37cdf63504.1548083538.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series One more fix related to TEST_GIT_INSTALLED | expand

Commit Message

Johannes Schindelin via GitGitGadget Jan. 21, 2019, 3:12 p.m. UTC
From: Johannes Schindelin <johannes.schindelin@gmx.de>

In 8abfdf44c882 (tests: explicitly use `git.exe` on Windows,
2018-11-14), we made sure to use the `.exe` file extension when
using an absolute path to `git.exe`, to avoid getting confused with a
file or directory in the same place that lacks said file extension.

For the same reason, we need to handle test-tool.exe the same way.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/test-lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Junio C Hamano Jan. 22, 2019, 9 p.m. UTC | #1
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> In 8abfdf44c882 (tests: explicitly use `git.exe` on Windows,
> 2018-11-14), we made sure to use the `.exe` file extension when
> using an absolute path to `git.exe`, to avoid getting confused with a
> file or directory in the same place that lacks said file extension.
>
> For the same reason, we need to handle test-tool.exe the same way.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  t/test-lib.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index a1abb1177a..9876b4bab0 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -1154,7 +1154,7 @@ test -d "$GIT_BUILD_DIR"/templates/blt || {
>  	error "You haven't built things yet, have you?"
>  }
>  
> -if ! test -x "$GIT_BUILD_DIR"/t/helper/test-tool
> +if ! test -x "$GIT_BUILD_DIR"/t/helper/test-tool$X
>  then
>  	echo >&2 'You need to build test-tool:'
>  	echo >&2 'Run "make t/helper/test-tool" in the source (toplevel) directory'

Thanks for being thorough.  Will queue.
Johannes Schindelin Jan. 23, 2019, 11:41 a.m. UTC | #2
Hi Junio,

On Tue, 22 Jan 2019, Junio C Hamano wrote:

> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
> 
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > In 8abfdf44c882 (tests: explicitly use `git.exe` on Windows,
> > 2018-11-14), we made sure to use the `.exe` file extension when
> > using an absolute path to `git.exe`, to avoid getting confused with a
> > file or directory in the same place that lacks said file extension.
> >
> > For the same reason, we need to handle test-tool.exe the same way.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> >  t/test-lib.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/t/test-lib.sh b/t/test-lib.sh
> > index a1abb1177a..9876b4bab0 100644
> > --- a/t/test-lib.sh
> > +++ b/t/test-lib.sh
> > @@ -1154,7 +1154,7 @@ test -d "$GIT_BUILD_DIR"/templates/blt || {
> >  	error "You haven't built things yet, have you?"
> >  }
> >  
> > -if ! test -x "$GIT_BUILD_DIR"/t/helper/test-tool
> > +if ! test -x "$GIT_BUILD_DIR"/t/helper/test-tool$X
> >  then
> >  	echo >&2 'You need to build test-tool:'
> >  	echo >&2 'Run "make t/helper/test-tool" in the source (toplevel) directory'
> 
> Thanks for being thorough.  Will queue.

Thank you for the praise. In this instance, I do not deserve it, though,
as it was the MSVC patch series (which I hope to send the mailing list's
way soon) that identified this problem. And it was Ben's bug report
(privately, as we're team mates) that pointed out that I forgot this in
the original patch series.

Ciao,
Dscho
diff mbox series

Patch

diff --git a/t/test-lib.sh b/t/test-lib.sh
index a1abb1177a..9876b4bab0 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1154,7 +1154,7 @@  test -d "$GIT_BUILD_DIR"/templates/blt || {
 	error "You haven't built things yet, have you?"
 }
 
-if ! test -x "$GIT_BUILD_DIR"/t/helper/test-tool
+if ! test -x "$GIT_BUILD_DIR"/t/helper/test-tool$X
 then
 	echo >&2 'You need to build test-tool:'
 	echo >&2 'Run "make t/helper/test-tool" in the source (toplevel) directory'