Chromium Code Reviews| Index: tests/submodule-merge-test.sh |
| =================================================================== |
| --- tests/submodule-merge-test.sh (revision 0) |
| +++ tests/submodule-merge-test.sh (revision 0) |
| @@ -0,0 +1,54 @@ |
| +#!/bin/bash |
|
cmp
2012/06/14 17:50:26
nit: needs a copyright header
szager1
2012/06/15 00:55:32
Be careful what you ask for...
|
| + |
| +set -e |
| + |
| +. ./test-lib.sh |
| + |
| +setup_initsvn |
| +setup_gitsvn_submodule |
| + |
| +( |
| + set -e |
| + prev_svn_revision=`svn info file://$PWD/svnrepo | grep ^Revision | \ |
| + sed s/^.*:// | xargs` |
| + cd git-svn-submodule |
| + git config rietveld.server localhost:1 |
| + git checkout -q --track -b work |
| + echo "some work done" >> test |
| + git add test; git commit -q -m "work \ |
| +TBR=foo" |
| + |
| + git_diff=`git diff HEAD^ | sed -n '/^@@/,$p' | xargs` |
| + |
| + test_expect_success "dcommitted code" \ |
| + "$GIT_CL dcommit -f --bypass-hooks -m 'dcommit'" |
| + |
| + cd .. |
| + |
| + next_svn_revision=`svn info file://$PWD/svnrepo | grep ^Revision | \ |
| + sed s/^.*:// | xargs` |
| + |
| + test_expect_success "svn got new revision" \ |
| + "test $next_svn_revision = `expr $prev_svn_revision + 1`" |
| + |
| + svn_diff=`svn diff -c $next_svn_revision file://$PWD/svnrepo | \ |
| + sed -n '/^@@/,$p' | xargs` |
| + |
| + test_expect_success "svn diff is correct" \ |
| + "test \"$git_diff\" = \"$svn_diff\"" |
| + |
| + cd git-svn-submodule |
| + git svn fetch |
| + last_svn_rev=`git show refs/remotes/trunk | grep git-svn-id: | \ |
| + grep -o trunk@[0-9]* | xargs` |
| + |
| + test_expect_success "git svn fetch gets new svn revision" \ |
| + "test $last_svn_rev = trunk@$next_svn_revision" |
| +) |
| +SUCCESS=$? |
| + |
| +#cleanup |
| + |
| +if [ $SUCCESS == 0 ]; then |
| + echo PASS |
| +fi |
| Property changes on: tests/submodule-merge-test.sh |
| ___________________________________________________________________ |
| Added: svn:executable |
| + * |
| Added: svn:eol-style |
| + LF |