From: Lars Hjemli <hjemli@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] Fix regression tests on Cygwin
Date: Mon, 23 Oct 2006 21:34:33 +0200
Date: Mon, 23 Oct 2006 21:01:50 +0200 [thread overview]
Message-ID: <11616320733093-git-send-email-hjemli@gmail.com> (raw)
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(-)
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
next reply other threads:[~2006-10-23 19:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-23 19:34 Lars Hjemli [this message]
2006-10-24 14:53 ` [PATCH] Fix regression tests on Cygwin Johannes Schindelin
2006-10-25 4:40 ` Junio C Hamano
2006-10-25 4:50 ` Junio C Hamano
2006-10-25 6:39 ` Lars Hjemli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11616320733093-git-send-email-hjemli@gmail.com \
--to=hjemli@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.