threads / patch / 6016

patchFix regression tests on Cygwin

Subject: [PATCH] Fix regression tests on Cygwin

## tl;dr

5 messages between Oct 23, 2006 and Oct 25, 2006. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Lars Hjemli· Oct 23, 2006, 19:34 UTC · lore
On Cygwin, "make test" failes due to missing ".exe" a couple of places.
This fixes it, in a somewhat ugly way....
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
---
 t/t0000-basic.sh |    9 ++++++++-
 t/test-lib.sh    |   10 +++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)
Show changes to 2 files +17 −2

t/t0000-basic.sh, t/test-lib.sh

diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 2c9bbb5..41d53be 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -25,7 +25,14 @@ # or have too old python without subproc
 # out before running any tests.  Also catch the bogosity of trying
 # to run tests without building while we are at it.
 
-../git >/dev/null
+X=
+uname=$(uname -o)
+if test "$uname" = "Cygwin"
+then
+	X=".exe"
+fi
+
+../git$X >/dev/null
 if test $? != 1
 then
 	echo >&2 'You do not seem to have built git yet.'
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 2488e6e..8a64f6e 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -43,6 +43,14 @@ case $(echo $GIT_TRACE |tr "[A-Z]" "[a-z
 		;;
 esac
 
+X=
+uname=$(uname -o)
+if test "$uname" = "Cygwin"
+then
+	X=".exe"
+fi
+
+
 # Each test should start with something like this, after copyright notices:
 #
 # test_description='Description of this test...
@@ -175,7 +183,7 @@ test_create_repo () {
 	repo="$1"
 	mkdir "$repo"
 	cd "$repo" || error "Cannot setup test environment"
-	"$GIT_EXEC_PATH/git" init-db --template=$GIT_EXEC_PATH/templates/blt/ 2>/dev/null ||
+	"$GIT_EXEC_PATH/git$X" init-db --template=$GIT_EXEC_PATH/templates/blt/ 2>/dev/null ||
 	error "cannot run git init-db -- have you built things yet?"
 	mv .git/hooks .git/hooks-disabled
 	cd "$owd"
-- 
1.4.3.1.g1688
Johannes Schindelin· Oct 24, 2006, 14:53 UTC · re: Lars Hjemli · lore

Re: [PATCH] Fix regression tests on Cygwin

Hi,
On Mon, 23 Oct 2006, Lars Hjemli wrote:
> On Cygwin, "make test" failes due to missing ".exe" a couple of places.

Last time I made "test" on cygwin, it did not complain. "../git" works perfectly here.

Ciao, Dscho

Junio C Hamano· Oct 25, 2006, 04:40 UTC · re: Johannes Schindelin · lore

Re: [PATCH] Fix regression tests on Cygwin

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 5 quoted lines
> On Mon, 23 Oct 2006, Lars Hjemli wrote:
>
>> On Cygwin, "make test" failes due to missing ".exe" a couple of places.
>
> Last time I made "test" on cygwin, it did not complain.

Same here (W2k, fairly up-to-date git, installed on local NTFS disk).

Junio C Hamano· Oct 25, 2006, 04:50 UTC · re: Junio C Hamano · lore

Re: [PATCH] Fix regression tests on Cygwin

Junio C Hamano <junkio@cox.net> writes:
Show 10 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
>> On Mon, 23 Oct 2006, Lars Hjemli wrote:
>>
>>> On Cygwin, "make test" failes due to missing ".exe" a couple of places.
>>
>> Last time I made "test" on cygwin, it did not complain.
>
> Same here (W2k, fairly up-to-date git, installed on local NTFS
> disk).
... and more importantly, with fairly up-to-date Cygwin.
Lars Hjemli· Oct 25, 2006, 06:39 UTC · re: Junio C Hamano · lore

Re: [PATCH] Fix regression tests on Cygwin

On 10/25/06, Junio C Hamano <junkio@cox.net> wrote:
Show 12 quoted lines
> Junio C Hamano <junkio@cox.net> writes:
>
> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> >
> >> On Mon, 23 Oct 2006, Lars Hjemli wrote:
> >>
> >>> On Cygwin, "make test" failes due to missing ".exe" a couple of places.
> >>
> >> Last time I made "test" on cygwin, it did not complain.
> >
> > Same here (W2k, fairly up-to-date git, installed on local NTFS
> > disk).

Well, then it's probably my cygwin-environment that is broken (make test used to work for me too...)

Sorry for the noise
--

← back to recent threads