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

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

Issue 5012006: Move git-cl into depot_tools.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 10 years 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 | « git_cl/test/basic.sh ('k') | git_cl/test/push-basic.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:executable
+ *
OLDNEW
(Empty)
1 #!/bin/bash
2
3 # Tests the "preupload and predcommit hooks" functionality, which lets you run
4 # hooks by installing a script into .git/hooks/pre-cl-* first.
5
6 set -e
7
8 . ./test-lib.sh
9
10 setup_initsvn
11 setup_gitsvn
12
13 (
14 set -e
15 cd git-svn
16
17 # We need a server set up, but we don't use it.
18 git config rietveld.server localhost:1
19
20 # Install a pre-cl-upload hook.
21 echo "#!/bin/bash" > .git/hooks/pre-cl-upload
22 echo "echo 'sample preupload fail'" >> .git/hooks/pre-cl-upload
23 echo "exit 1" >> .git/hooks/pre-cl-upload
24 chmod 755 .git/hooks/pre-cl-upload
25
26 # Install a pre-cl-dcommit hook.
27 echo "#!/bin/bash" > .git/hooks/pre-cl-dcommit
28 echo "echo 'sample predcommit fail'" >> .git/hooks/pre-cl-dcommit
29 echo "exit 1" >> .git/hooks/pre-cl-dcommit
30 chmod 755 .git/hooks/pre-cl-dcommit
31
32 echo "some work done" >> test
33 git add test; git commit -q -m "work"
34
35 # Verify git cl upload fails.
36 test_expect_failure "git-cl upload hook fails" "$GIT_CL upload master"
37
38 # Verify git cl upload fails.
39 test_expect_failure "git-cl dcommit hook fails" "$GIT_CL dcommit master"
40 )
41 SUCCESS=$?
42
43 #cleanup
44
45 if [ $SUCCESS == 0 ]; then
46 echo PASS
47 fi
OLDNEW
« no previous file with comments | « git_cl/test/basic.sh ('k') | git_cl/test/push-basic.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698