You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1018 B
Bash
47 lines
1018 B
Bash
14 years ago
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
. ./test-lib.sh
|
||
|
|
||
|
setup_initsvn
|
||
|
setup_gitsvn
|
||
|
|
||
|
(
|
||
|
|
||
|
set -e
|
||
|
cd git-svn
|
||
|
git config rietveld.server localhost:8080
|
||
|
export EDITOR=$(which true)
|
||
|
|
||
|
git checkout -q -b work
|
||
|
echo "ben@chromium.org" > OWNERS
|
||
|
cat <<END > PRESUBMIT.py
|
||
|
def CheckChangeOnCommit(input_api, output_api):
|
||
|
return input_api.canned_checks.CheckOwners(input_api, output_api)
|
||
|
|
||
|
CheckChangeOnUpload = CheckChangeOnCommit
|
||
|
END
|
||
|
|
||
|
git add OWNERS PRESUBMIT.py ; git commit -q -m "add OWNERS"
|
||
|
|
||
|
test_expect_success "upload succeeds (needs a server running on localhost)" \
|
||
|
"$GIT_CL upload -m test master | grep -q 'Issue created'"
|
||
|
|
||
|
test_expect_success "git-cl status has a suggested reviewer" \
|
||
|
"$GIT_CL status | grep -q 'R=ben@chromium.org'"
|
||
|
|
||
|
test_expect_failure "git-cl dcommit fails w/ missing LGTM" \
|
||
14 years ago
|
"$GIT_CL dcommit -f"
|
||
14 years ago
|
|
||
|
test_expect_success "git-cl dcommit --tbr succeeds" \
|
||
|
"$GIT_CL dcommit --tbr -f | grep -q -- '--tbr was specified'"
|
||
|
)
|
||
|
SUCCESS=$?
|
||
|
|
||
|
cleanup
|
||
|
|
||
|
if [ $SUCCESS == 0 ]; then
|
||
|
echo PASS
|
||
|
fi
|