git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: GIT Mailing-list <git@vger.kernel.org>,
	Lea Wiemann <lewiemann@gmail.com>
Subject: Re: [PATCH] t9700-perl-git.sh: Fix a test failure on cygwin
Date: Wed, 27 Aug 2008 12:34:23 -0700	[thread overview]
Message-ID: <7vd4jup800.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <48B5984B.4020901@ramsay1.demon.co.uk> (Ramsay Jones's message of "Wed, 27 Aug 2008 19:09:15 +0100")

Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:

> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> ---
>
> This patch fixes the t9700 test failure on cygwin. Don't ask me to
> explain why the original test.pl fails on cygwin, but passes on Linux!
>
> My perl version:
>
>     $ perl --version
>
>     This is perl, v5.8.7 built for cygwin-thread-multi-64int
>     (with 1 registered patch, see perl -V for more detail)
>
>     Copyright 1987-2005, Larry Wall
>
>     Perl may be copied only under the terms of either the Artistic License or the
>     GNU General Public License, which may be found in the Perl 5 source kit.
>
>     Complete documentation for Perl, including FAQ lists, should be found on
>     this system using `man perl' or `perldoc perl'.  If you have access to the
>     Internet, point your browser at http://www.perl.org/, the Perl Home Page.
>     $ 
>
> [My perl version on Linux is whatever comes with Ubuntu 7.04]

Curious.

What does this give you:

	$ cd t
        $ sh t9700-perl-git.sh -v

with the attached patch?  Unfortunately this cannot be run with "-i -v"
because 'test_external_without_stderr' uses test_external which in turn
exits upon failure when -i is given, without letting the former to report
what was given to the standard error stream (this is slightly offtopic but
pertains to debuggability of tests, so Lea is Cc'ed).

For me, cwd() is the same as Cwd->cwd (this is from Perl 5.8.8); perhaps
it behaves differently on Cygwin?

 t/t9700/test.pl |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git i/t/t9700/test.pl w/t/t9700/test.pl
index 851cea4..139711d 100755
--- i/t/t9700/test.pl
+++ w/t/t9700/test.pl
@@ -15,6 +15,12 @@ BEGIN { use_ok('Git') }
 
 # set up
 our $abs_repo_dir = Cwd->cwd;
+our $cwd = cwd();
+print STDERR "Cwd->cwd says '$abs_repo_dir'\n";
+print STDERR "cwd() says '$cwd'\n";
+
+exit(1);
+
 ok(our $r = Git->repository(Directory => "."), "open repository");
 
 # config

  reply	other threads:[~2008-08-27 19:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 18:09 [PATCH] t9700-perl-git.sh: Fix a test failure on cygwin Ramsay Jones
2008-08-27 19:34 ` Junio C Hamano [this message]
2008-08-29 20:56   ` Ramsay Jones
2009-11-19 18:41 [PATCH] t9700-perl-git.sh: Fix a test failure on Cygwin Ramsay Jones
2009-12-30 13:40 ` Nanako Shiraishi
2009-12-31  6:49   ` Junio C Hamano
2010-01-01  0:05     ` Nanako Shiraishi
2010-01-01  0:07       ` Junio C Hamano

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=7vd4jup800.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=lewiemann@gmail.com \
    --cc=ramsay@ramsay1.demon.co.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).