| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/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 # Check that we're able to submit from a directory that doesn't exist on the | 7 # Check that we're able to submit from a directory that doesn't exist on the |
| 8 # trunk. This tests for a previous bug where we ended up with an invalid CWD | 8 # trunk. This tests for a previous bug where we ended up with an invalid CWD |
| 9 # after switching to the merge branch. | 9 # after switching to the merge branch. |
| 10 | 10 |
| 11 set -e | 11 set -e |
| 12 | 12 |
| 13 . ./test-lib.sh | 13 . ./test-lib.sh |
| 14 | 14 |
| 15 setup_initsvn | 15 setup_initsvn |
| 16 setup_gitsvn | 16 setup_gitsvn |
| 17 | 17 |
| 18 ( | 18 ( |
| 19 set -e | 19 set -e |
| 20 cd git-svn | 20 cd git-svn |
| 21 git config rietveld.server localhost:8080 | 21 git config rietveld.server localhost:10000 |
| 22 | 22 |
| 23 # Create a branch and give it an issue. | 23 # Create a branch and give it an issue. |
| 24 git checkout -q -b new | 24 git checkout -q -b new |
| 25 mkdir dir | 25 mkdir dir |
| 26 cd dir | 26 cd dir |
| 27 echo "some work done on a branch" >> test | 27 echo "some work done on a branch" >> test |
| 28 git add test; git commit -q -m "branch work" | 28 git add test; git commit -q -m "branch work" |
| 29 export GIT_EDITOR=$(which true) | 29 export GIT_EDITOR=$(which true) |
| 30 test_expect_success "upload succeeds" \ | 30 test_expect_success "upload succeeds" \ |
| 31 "$GIT_CL upload -m test master | grep -q 'Issue created'" | 31 "$GIT_CL upload -m test master | grep -q 'Issue created'" |
| 32 test_expect_success "git-cl dcommits ok" \ | 32 test_expect_success "git-cl dcommits ok" \ |
| 33 "$GIT_CL dcommit -f" | 33 "$GIT_CL dcommit -f" |
| 34 ) | 34 ) |
| 35 | 35 |
| 36 SUCCESS=$? | 36 SUCCESS=$? |
| 37 | 37 |
| 38 cleanup | 38 cleanup |
| 39 | 39 |
| 40 if [ $SUCCESS == 0 ]; then | 40 if [ $SUCCESS == 0 ]; then |
| 41 echo PASS | 41 echo PASS |
| 42 fi | 42 fi |
| OLD | NEW |