vcssync: expose overlay-hg-repos cli to tests (
bug 1340031) r?smacleod
overlay-hg-repos wasn't callable from tests, causing failures.
MozReview-Commit-ID: CbdyUYxbuHl
--- a/vcssync/tests/helpers.sh
+++ b/vcssync/tests/helpers.sh
@@ -1,14 +1,24 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
. $TESTDIR/hgserver/tests/helpers.sh
+# create overlay-hg-repos cli
+cat > $TESTTMP/overlay-hg-repos <<EOF
+#!$TESTDIR/venv/bin/python
+import sys
+from mozvcssync.cli import overlay_hg_repos_cli
+sys.exit(overlay_hg_repos_cli())
+EOF
+chmod +x $TESTTMP/overlay-hg-repos
+alias overlay-hg-repos=$TESTTMP/overlay-hg-repos
+
# make git commits deterministic and environment agnostic
export GIT_AUTHOR_NAME=test
export GIT_AUTHOR_EMAIL=test@example.com
export GIT_AUTHOR_DATE='Thu Jan 1 00:00:00 1970 +0000'
export GIT_COMMITTER_NAME=test
export GIT_COMMITTER_EMAIL=test@example.com
export GIT_COMMITTER_DATE='Thu Jan 1 00:00:00 1970 +0000'