From: Jonathan Nieder <jrnieder@gmail.com>
To: A Large Angry SCM <gitzilla@gmail.com>
Cc: git@vger.kernel.org, Torsten Schmutzler <git-ts@theblacksun.eu>,
Eric Wong <normalperson@yhbt.net>
Subject: [PATCH] t9118 (git-svn): prevent early failure from taking down later tests
Date: Thu, 8 Jul 2010 08:36:02 -0500 [thread overview]
Message-ID: <20100708133602.GA1882@burratino> (raw)
In-Reply-To: <4C352EB5.5020005@gmail.com>
When test #2 fails, the cwd is project/, causing all the
remaining tests in the same script to get confused and fail.
So in the spirit of v1.7.1.1~53^2~10 (t5550-http-fetch: Use subshell
for repository operations, 2010-04-17), use a subshell for svn
working copy operations. This way, the cwd will reliably return
to the top of the trash directory and later tests can still be run
when a command has failed.
Reported-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
A Large Angry SCM wrote:
> *** t9118-git-svn-funky-branch-names.sh ***
> ok 1 - setup svnrepo
> not ok - 2 test clone with funky branch names
Relates to an svn change from some point between 1.5.1 and 1.6.12.
Not solved yet. See
<http://thread.gmane.org/gmane.comp.version-control.git/146498/focus=150549>.
> not ok - 3 test dcommit to funky branch
> not ok - 4 test dcommit to scary branch
> not ok - 5 test dcommit to trailing_dotlock branch
Collateral damage. How about this patch?
t/t9118-git-svn-funky-branch-names.sh | 46 ++++++++++++++++++---------------
1 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh
index 7d7acc3..5dbea59 100755
--- a/t/t9118-git-svn-funky-branch-names.sh
+++ b/t/t9118-git-svn-funky-branch-names.sh
@@ -34,42 +34,46 @@ test_expect_success 'setup svnrepo' '
test_expect_success 'test clone with funky branch names' '
git svn clone -s "$svnrepo/pr ject" project &&
- cd project &&
+ (
+ cd project &&
git rev-parse "refs/remotes/fun%20plugin" &&
git rev-parse "refs/remotes/more%20fun%20plugin!" &&
git rev-parse "refs/remotes/$scary_ref" &&
git rev-parse "refs/remotes/%2Eleading_dot" &&
git rev-parse "refs/remotes/trailing_dot%2E" &&
git rev-parse "refs/remotes/trailing_dotlock%2Elock" &&
- git rev-parse "refs/remotes/not-a%40{0}reflog" &&
- cd ..
+ git rev-parse "refs/remotes/not-a%40{0}reflog"
+ )
'
test_expect_success 'test dcommit to funky branch' "
- cd project &&
- git reset --hard 'refs/remotes/more%20fun%20plugin!' &&
- echo hello >> foo &&
- git commit -m 'hello' -- foo &&
- git svn dcommit &&
- cd ..
+ (
+ cd project &&
+ git reset --hard 'refs/remotes/more%20fun%20plugin!' &&
+ echo hello >> foo &&
+ git commit -m 'hello' -- foo &&
+ git svn dcommit
+ )
"
test_expect_success 'test dcommit to scary branch' '
- cd project &&
- git reset --hard "refs/remotes/$scary_ref" &&
- echo urls are scary >> foo &&
- git commit -m "eep" -- foo &&
- git svn dcommit &&
- cd ..
+ (
+ cd project &&
+ git reset --hard "refs/remotes/$scary_ref" &&
+ echo urls are scary >> foo &&
+ git commit -m "eep" -- foo &&
+ git svn dcommit
+ )
'
test_expect_success 'test dcommit to trailing_dotlock branch' '
- cd project &&
- git reset --hard "refs/remotes/trailing_dotlock%2Elock" &&
- echo who names branches like this anyway? >> foo &&
- git commit -m "bar" -- foo &&
- git svn dcommit &&
- cd ..
+ (
+ cd project &&
+ git reset --hard "refs/remotes/trailing_dotlock%2Elock" &&
+ echo who names branches like this anyway? >> foo &&
+ git commit -m "bar" -- foo &&
+ git svn dcommit
+ )
'
stop_httpd
--
1.7.2.rc1.527.gff41c3.dirty
next prev parent reply other threads:[~2010-07-08 13:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-08 1:49 t9118 broken in current master, 9918285, git/git/v1.7.2-rc2 A Large Angry SCM
2010-07-08 3:15 ` Brian Gernhardt
2010-07-08 3:42 ` Brian Gernhardt
2010-07-08 14:06 ` A Large Angry SCM
2010-07-08 13:36 ` Jonathan Nieder [this message]
2010-07-08 14:35 ` [PATCH] t9118 (git-svn): prevent early failure from taking down later tests A Large Angry SCM
2010-07-08 16:48 ` Jonathan Nieder
2010-07-08 20:59 ` Eric Wong
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=20100708133602.GA1882@burratino \
--to=jrnieder@gmail.com \
--cc=git-ts@theblacksun.eu \
--cc=git@vger.kernel.org \
--cc=gitzilla@gmail.com \
--cc=normalperson@yhbt.net \
/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).