Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: tests/submodule-merge-test.sh

Issue 10543151: Add test for git-svn with submodule/merge layout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/submit-from-new-dir.sh ('k') | tests/test-lib.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 #!/bin/bash
2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 set -e
8
9 . ./test-lib.sh
10
11 setup_initsvn
12 setup_gitsvn_submodule
13
14 (
15 set -e
16 prev_svn_revision=`svn info file://$PWD/svnrepo | grep ^Revision | \
17 sed s/^.*:// | xargs`
18 cd git-svn-submodule
19 git config rietveld.server localhost:1
20 git checkout -q --track -b work
21 echo "some work done" >> test
22 git add test; git commit -q -m "work \
23 TBR=foo"
24
25 git_diff=`git diff HEAD^ | sed -n '/^@@/,$p' | xargs`
26
27 test_expect_success "dcommitted code" \
28 "$GIT_CL dcommit -f --bypass-hooks -m 'dcommit'"
29
30 cd ..
31
32 next_svn_revision=`svn info file://$PWD/svnrepo | grep ^Revision | \
33 sed s/^.*:// | xargs`
34
35 test_expect_success "svn got new revision" \
36 "test $next_svn_revision = `expr $prev_svn_revision + 1`"
37
38 svn_diff=`svn diff -c $next_svn_revision file://$PWD/svnrepo | \
39 sed -n '/^@@/,$p' | xargs`
40
41 test_expect_success "svn diff is correct" \
42 "test \"$git_diff\" = \"$svn_diff\""
43
44 cd git-svn-submodule
45 git svn fetch
46 last_svn_rev=`git show refs/remotes/trunk | grep git-svn-id: | \
47 grep -o trunk@[0-9]* | xargs`
48
49 test_expect_success "git svn fetch gets new svn revision" \
50 "test $last_svn_rev = trunk@$next_svn_revision"
51 )
52 SUCCESS=$?
53
54 #cleanup
55
56 if [ $SUCCESS == 0 ]; then
57 echo PASS
58 fi
OLDNEW
« no previous file with comments | « tests/submit-from-new-dir.sh ('k') | tests/test-lib.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698