gerrit tests should return to checked out branch

when running "tox -e gerrit" on a local checkout
after the tests have finshed the repo is checked out
to the HEAD commit, not the branch that was checked
out before the run.

This ensures the branch is checked out at the end
of the test.

Change-Id: I58dae937000d05c3a9b09dc4aed5362a5c56d133
This commit is contained in:
Graham Hayes 2018-02-16 14:12:18 +00:00
parent ef5cdd3001
commit 3539921573
No known key found for this signature in database
GPG Key ID: 1B263DC59F4AEFD5

View File

@ -2,6 +2,7 @@
GITHEAD=$(git rev-parse HEAD)
GITBRANCH=$(git rev-parse --abbrev-ref HEAD)
# Check out previous version
git checkout HEAD~1
@ -16,3 +17,4 @@ python tools/check_gerrit_projects_changed.py gerrit/projects-old.yaml \
gerrit/projects.yaml
rm gerrit/projects-old.yaml
git checkout $GITBRANCH