| 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 SCRIPT_DIR=$(cd $(dirname "$BASH_SOURCE") && pwd) | 8 SCRIPT_DIR=$(cd $(dirname "$BASH_SOURCE") && pwd) |
| 9 cd ${SCRIPT_DIR} | 9 cd ${SCRIPT_DIR} |
| 10 | 10 |
| 11 . ./test-lib.sh | 11 . ./test-lib.sh |
| 12 | 12 |
| 13 setup_initsvn | 13 setup_initsvn |
| 14 setup_gitsvn_submodule | 14 setup_gitsvn_submodule |
| 15 | 15 |
| 16 ( | 16 ( |
| 17 set -e | 17 set -e |
| 18 prev_svn_revision=`svn info file://$PWD/svnrepo | grep ^Revision | \ | 18 prev_svn_revision=`svn info file://$PWD/svnrepo | grep ^Revision | \ |
| 19 sed s/^.*:// | xargs` | 19 sed s/^.*:// | xargs` |
| 20 cd git-svn-submodule | 20 cd git-svn-submodule |
| 21 git config rietveld.server localhost:1 | 21 git config rietveld.server localhost:1 |
| 22 git checkout -q --track -b work | 22 git checkout -q --track -b work |
| 23 echo "some work done" >> test | 23 echo "some work done" >> test |
| 24 git add test; git commit -q -m "work \ | 24 git add test; git commit -q -m "work \ |
| 25 TBR=foo" | 25 TBR=foo" |
| 26 | 26 |
| 27 git_diff=`git diff HEAD^ | sed -n '/^@@/,$p' | xargs` | 27 git_diff=`git diff HEAD^ | sed -n '/^@@/,$p' | xargs` |
| 28 | 28 |
| 29 test_expect_success "dcommitted code" \ | 29 test_expect_success "dcommitted code" \ |
| 30 "$GIT_CL dcommit -f --bypass-hooks -m 'dcommit'" | 30 "$GIT_CL dcommit --no-oauth2 -f --bypass-hooks -m 'dcommit'" |
| 31 | 31 |
| 32 cd .. | 32 cd .. |
| 33 | 33 |
| 34 next_svn_revision=`svn info file://$PWD/svnrepo | grep ^Revision | \ | 34 next_svn_revision=`svn info file://$PWD/svnrepo | grep ^Revision | \ |
| 35 sed s/^.*:// | xargs` | 35 sed s/^.*:// | xargs` |
| 36 | 36 |
| 37 test_expect_success "svn got new revision" \ | 37 test_expect_success "svn got new revision" \ |
| 38 "test $next_svn_revision = `expr $prev_svn_revision + 1`" | 38 "test $next_svn_revision = `expr $prev_svn_revision + 1`" |
| 39 | 39 |
| 40 svn_diff=`svn diff -c $next_svn_revision file://$PWD/svnrepo | \ | 40 svn_diff=`svn diff -c $next_svn_revision file://$PWD/svnrepo | \ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 51 test_expect_success "git svn fetch gets new svn revision" \ | 51 test_expect_success "git svn fetch gets new svn revision" \ |
| 52 "test $last_svn_rev = trunk@$next_svn_revision" | 52 "test $last_svn_rev = trunk@$next_svn_revision" |
| 53 ) | 53 ) |
| 54 SUCCESS=$? | 54 SUCCESS=$? |
| 55 | 55 |
| 56 #cleanup | 56 #cleanup |
| 57 | 57 |
| 58 if [ $SUCCESS == 0 ]; then | 58 if [ $SUCCESS == 0 ]; then |
| 59 echo PASS | 59 echo PASS |
| 60 fi | 60 fi |
| OLD | NEW |