OLD | NEW |
1 #!/usr/bin/env bash | 1 #!/usr/bin/env bash |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 set -e | 7 set -e |
8 | 8 |
9 . ./test-lib.sh | 9 . ./test-lib.sh |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 "test $next_svn_revision = `expr $prev_svn_revision + 1`" | 36 "test $next_svn_revision = `expr $prev_svn_revision + 1`" |
37 | 37 |
38 svn_diff=`svn diff -c $next_svn_revision file://$PWD/svnrepo | \ | 38 svn_diff=`svn diff -c $next_svn_revision file://$PWD/svnrepo | \ |
39 sed -n '/^@@/,$p' | xargs` | 39 sed -n '/^@@/,$p' | xargs` |
40 | 40 |
41 test_expect_success "svn diff is correct" \ | 41 test_expect_success "svn diff is correct" \ |
42 "test \"$git_diff\" = \"$svn_diff\"" | 42 "test \"$git_diff\" = \"$svn_diff\"" |
43 | 43 |
44 cd git-svn-submodule | 44 cd git-svn-submodule |
45 git svn fetch | 45 git svn fetch |
46 last_svn_rev=`git show refs/remotes/trunk | grep git-svn-id: | \ | 46 last_svn_rev=`git show refs/remotes/origin/trunk | grep git-svn-id: | \ |
47 grep -o trunk@[0-9]* | xargs` | 47 grep -o trunk@[0-9]* | xargs` |
48 | 48 |
49 test_expect_success "git svn fetch gets new svn revision" \ | 49 test_expect_success "git svn fetch gets new svn revision" \ |
50 "test $last_svn_rev = trunk@$next_svn_revision" | 50 "test $last_svn_rev = trunk@$next_svn_revision" |
51 ) | 51 ) |
52 SUCCESS=$? | 52 SUCCESS=$? |
53 | 53 |
54 #cleanup | 54 #cleanup |
55 | 55 |
56 if [ $SUCCESS == 0 ]; then | 56 if [ $SUCCESS == 0 ]; then |
57 echo PASS | 57 echo PASS |
58 fi | 58 fi |
OLD | NEW |