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

Side by Side Diff: tests/post-dcommit-hook-test.sh

Issue 7253015: Remove manual --tbr support and convert it into automatic TBR= detection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: removed tests/tbr.sh Created 9 years, 5 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
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 set -e 3 set -e
4 4
5 . ./test-lib.sh 5 . ./test-lib.sh
6 6
7 setup_initsvn 7 setup_initsvn
8 setup_gitsvn 8 setup_gitsvn
9 9
10 ( 10 (
11 set -e 11 set -e
12 cd git-svn 12 cd git-svn
13 13
14 cat > .git/hooks/post-cl-dcommit << _EOF 14 cat > .git/hooks/post-cl-dcommit << _EOF
15 #!/bin/bash 15 #!/bin/bash
16 git branch -m COMMITTED 16 git branch -m COMMITTED
17 _EOF 17 _EOF
18 chmod +x .git/hooks/post-cl-dcommit 18 chmod +x .git/hooks/post-cl-dcommit
19 19
20 git config rietveld.server localhost:1 20 git config rietveld.server localhost:1
21 git checkout -q --track -b work 21 git checkout -q --track -b work
22 echo "some work done" >> test 22 echo "some work done" >> test
23 git add test; git commit -q -m "work" 23 git add test; git commit -q -m "work \
24 TBR=foo"
24 25
25 test_expect_success "dcommitted code" \ 26 test_expect_success "dcommitted code" \
26 "$GIT_CL dcommit -f --tbr --bypass-hooks -m 'dcommit'" 27 "$GIT_CL dcommit -f --bypass-hooks -m 'dcommit'"
27 28
28 test_expect_success "post-cl-dcommit hook executed" \ 29 test_expect_success "post-cl-dcommit hook executed" \
29 "git symbolic-ref HEAD | grep -q COMMITTED" 30 "git symbolic-ref HEAD | grep -q COMMITTED"
30 ) 31 )
31 SUCCESS=$? 32 SUCCESS=$?
32 33
33 cleanup 34 cleanup
34 35
35 if [ $SUCCESS == 0 ]; then 36 if [ $SUCCESS == 0 ]; then
36 echo PASS 37 echo PASS
37 fi 38 fi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698