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

Side by Side Diff: git_cl/test/abandon.sh

Issue 6646041: Make git-cl tests work on Mac SnowLeopard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 9 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 | « no previous file | git_cl/test/rename.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Check that abandoning a branch also abandons its issue. 3 # Check that abandoning a branch also abandons its issue.
4 4
5 set -e 5 set -e
6 6
7 . ./test-lib.sh 7 . ./test-lib.sh
8 8
9 setup_initsvn 9 setup_initsvn
10 setup_gitsvn 10 setup_gitsvn
11 11
12 ( 12 (
13 set -e 13 set -e
14 cd git-svn 14 cd git-svn
15 git config rietveld.server localhost:8080 15 git config rietveld.server localhost:8080
16 16
17 # Create a branch and give it an issue. 17 # Create a branch and give it an issue.
18 git checkout -q -b abandoned 18 git checkout -q -b abandoned
19 echo "some work done on a branch" >> test 19 echo "some work done on a branch" >> test
20 git add test; git commit -q -m "branch work" 20 git add test; git commit -q -m "branch work"
21 export EDITOR=/bin/true 21 export EDITOR=$(which true)
22 test_expect_success "upload succeeds" \ 22 test_expect_success "upload succeeds" \
23 "$GIT_CL upload -m test master... | grep -q 'Issue created'" 23 "$GIT_CL upload -m test master... | grep -q 'Issue created'"
24 24
25 # Switch back to master, delete the branch. 25 # Switch back to master, delete the branch.
26 git checkout master 26 git checkout master
27 git branch -D abandoned 27 git branch -D abandoned
28 28
29 # Verify that "status" doesn't know about it anymore. 29 # Verify that "status" doesn't know about it anymore.
30 # The "exit" trickiness is inverting the exit status of grep. 30 # The "exit" trickiness is inverting the exit status of grep.
31 test_expect_success "git-cl status dropped abandoned branch" \ 31 test_expect_success "git-cl status dropped abandoned branch" \
32 "$GIT_CL status | grep -q abandoned && exit 1 || exit 0" 32 "$GIT_CL status | grep -q abandoned && exit 1 || exit 0"
33 ) 33 )
34 34
35 SUCCESS=$? 35 SUCCESS=$?
36 36
37 cleanup 37 cleanup
38 38
39 if [ $SUCCESS == 0 ]; then 39 if [ $SUCCESS == 0 ]; then
40 echo PASS 40 echo PASS
41 fi 41 fi
OLDNEW
« no previous file with comments | « no previous file | git_cl/test/rename.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698