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

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

Issue 6646009: update git-cl for OWNERS file support via .git/hooks/pre-cl-* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: clean up after running owners-related git-cl tests 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 | « git_cl/test/git-cl-test-hook ('k') | git_cl_hooks.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/bash
2
3 set -e
4
5 . ./test-lib.sh
6
7 setup_initsvn
8 setup_gitsvn
9
10 (
11
12 set -e
13 cd git-svn
14 git config rietveld.server localhost:8080
15 export EDITOR=$(which true)
16
17 cp ../git-cl-test-hook .git/hooks/pre-cl-upload
18 cp ../git-cl-test-hook .git/hooks/pre-cl-dcommit
19 chmod 755 .git/hooks/pre-cl-upload
20 chmod 755 .git/hooks/pre-cl-dcommit
21
22 git checkout -q -b work
23 echo "ben@chromium.org" > OWNERS
24 cat <<END > PRESUBMIT.py
25 def CheckChangeOnCommit(input_api, output_api):
26 return input_api.canned_checks.CheckOwners(input_api, output_api)
27
28 CheckChangeOnUpload = CheckChangeOnCommit
29 END
30
31 git add OWNERS PRESUBMIT.py ; git commit -q -m "add OWNERS"
32
33 test_expect_success "upload succeeds (needs a server running on localhost)" \
34 "$GIT_CL upload -m test master | grep -q 'Issue created'"
35
36 test_expect_success "git-cl status has a suggested reviewer" \
37 "$GIT_CL status | grep -q 'R=ben@chromium.org'"
38
39 test_expect_failure "git-cl dcommit fails w/ missing LGTM" \
40 "$GIT_CL dcommit"
41
42 test_expect_success "git-cl dcommit --tbr succeeds" \
43 "$GIT_CL dcommit --tbr -f | grep -q -- '--tbr was specified'"
44 )
45 SUCCESS=$?
46
47 cleanup
48
49 if [ $SUCCESS == 0 ]; then
50 echo PASS
51 fi
OLDNEW
« no previous file with comments | « git_cl/test/git-cl-test-hook ('k') | git_cl_hooks.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698