@matheusbsbs / matheus-bagliano / commits / 4385355454
Fork 0

git-svn: t/t91??-*: optimize the tests a bit

This removes some unnecessary 'svn up' calls throughout t9103-git-svn-graft-branches.sh: * removed an 'svn log' call that was leftover from debugging * removed multiple git-svn calls with a multi-init / multi-fetch combination (which weren't tested before, either) * replaced `rev-list ... | head -n1` with `rev-parse ...` (not sure what I was thinking when I wrote that) All this saves about 9 seconds from a test run (53s -> 44s for 'make t91*') on my 1.3GHz Athlon Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>

Eric Wong committed Dec 31, 2006 at 21:49 UTC 43853554542700e0d129ce853a3d4b16740035d4
3 files changed +7 -19
t/t9101-git-svn-props.sh
+3 -8
@@ -57,13 +57,10 @@ test_expect_success 'setup some commits to svn' \
57 'cd test_wc &&
58 echo Greetings >> kw.c &&
59 svn commit -m "Not yet an Id" &&
60 - svn up &&
60 echo Hello world >> kw.c &&
61 svn commit -m "Modified file, but still not yet an Id" &&
63 - svn up &&
62 svn propset svn:keywords Id kw.c &&
65 - svn commit -m "Propset Id" &&
66 - svn up &&
63 + svn commit -m "Propset Id"
64 cd ..'
65
66 test_expect_success 'initialize git-svn' "git-svn init $svnrepo"
@@ -86,8 +83,7 @@ test_expect_success "propset CR on crlf files" \
83 svn propset svn:eol-style CR empty &&
84 svn propset svn:eol-style CR crlf &&
85 svn propset svn:eol-style CR ne_crlf &&
89 - svn commit -m "propset CR on crlf files" &&
90 - svn up &&
86 + svn commit -m "propset CR on crlf files"
87 cd ..'
88
89 test_expect_success 'fetch and pull latest from svn and checkout a new wc' \
@@ -111,8 +107,7 @@ cd test_wc
107 svn propset svn:eol-style CRLF ne_cr &&
108 svn propset svn:keywords Id cr &&
109 svn propset svn:keywords Id ne_cr &&
114 - svn commit -m "propset CRLF on cr files" &&
115 - svn up'
110 + svn commit -m "propset CRLF on cr files"'
111 cd ..
112 test_expect_success 'fetch and pull latest from svn' \
113 'git-svn fetch && git pull . remotes/git-svn'
t/t9103-git-svn-graft-branches.sh
+4 -10
@@ -16,25 +16,19 @@ test_expect_success 'initialize repo' "
16 cd wc &&
17 echo feedme >> branches/a/readme &&
18 svn commit -m hungry &&
19 - svn up &&
19 cd trunk &&
20 svn merge -r3:4 $svnrepo/branches/a &&
21 svn commit -m 'merge with a' &&
22 cd ../.. &&
24 - svn log -v $svnrepo &&
25 - git-svn init -i trunk $svnrepo/trunk &&
26 - git-svn init -i a $svnrepo/branches/a &&
27 - git-svn init -i tags/a $svnrepo/tags/a &&
28 - git-svn fetch -i tags/a &&
29 - git-svn fetch -i a &&
30 - git-svn fetch -i trunk
23 + git-svn multi-init $svnrepo -T trunk -b branches -t tags &&
24 + git-svn multi-fetch
25 "
26
27 r1=`git-rev-list remotes/trunk | tail -n1`
28 r2=`git-rev-list remotes/tags/a | tail -n1`
29 r3=`git-rev-list remotes/a | tail -n1`
36 -r4=`git-rev-list remotes/a | head -n1`
37 -r5=`git-rev-list remotes/trunk | head -n1`
30 +r4=`git-rev-parse remotes/a`
31 +r5=`git-rev-parse remotes/trunk`
32
33 test_expect_success 'test graft-branches regexes and copies' "
34 test -n "$r1" &&
t/t9104-git-svn-follow-parent.sh
-1
@@ -17,7 +17,6 @@ test_expect_success 'initialize repo' "
17 cd wc &&
18 echo world >> trunk/readme &&
19 svn commit -m 'another commit' &&
20 - svn up &&
20 svn mv -m 'rename to thunk' trunk thunk &&
21 svn up &&
22 echo goodbye >> thunk/readme &&