config: add an integration test
Add a test beyond unittests to help catch real world config logic.
This would have caught the regression in placeholder expansion.
This actually caught REPO_PATH being set incorrectly. But doesn't
seem like anyone is using it currently, so not a big deal.
Bug: 139175041
Test: repo upload works
Change-Id: I7f6a10b3bceffcfcddeb26aa91a2048ca3d52aeb
diff --git a/pre-upload.py b/pre-upload.py
index 0ceb191..681a269 100755
--- a/pre-upload.py
+++ b/pre-upload.py
@@ -263,7 +263,7 @@
os.environ.update({
'REPO_LREV': rh.git.get_commit_for_ref(upstream_branch),
- 'REPO_PATH': proj_dir,
+ 'REPO_PATH': os.path.relpath(proj_dir, rh.git.find_repo_root()),
'REPO_PROJECT': project_name,
'REPO_REMOTE': remote,
'REPO_RREV': rh.git.get_remote_revision(upstream_branch, remote),