path: root/tests/cli/testllvmpush.py
diff options
authorDiana Picus <diana.picus@linaro.org>2017-11-01 13:16:54 +0100
committerDiana Picus <diana.picus@linaro.org>2017-11-03 11:24:26 +0100
commit95226d4cd09790c3628ab8474cfdb21bf3fe99ad (patch)
treec1ae10a0a3db9a7a7aca58a5da77f5ca434f1855 /tests/cli/testllvmpush.py
parent7fefe1e34549a439f42facfa1bf769b35a48cffe (diff)
llvm push: Print remote branch name after pushing
Get llvm.py push to print the name of the remote branch that it has pushed to. This is helpful so developers don't need to guess what namespaces have been prepended to the branch name, and also serves as quick visual confirmation. This required a bit of refactoring, since the name of the branch was computed when needed. We now compute it separately and pass it in to the function that pushes the branch. We rely on the fact that the branch name will be the same for all the subprojects involved. Most of the changes are mechanical, to account for this refactoring (including new names for some of the existing functions, which make more sense in this new context). Change-Id: Id7e496bcded60080803e3a850d73329428bc3bac
Diffstat (limited to 'tests/cli/testllvmpush.py')
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/cli/testllvmpush.py b/tests/cli/testllvmpush.py
index 769aa18..1d9b8ab 100644
--- a/tests/cli/testllvmpush.py
+++ b/tests/cli/testllvmpush.py
@@ -101,9 +101,12 @@ class Testllvmpush(LLVMTestCase):
with cd(worktreePath):
self.create_dummy_commit("Test {} push".format(subproj))
- self.run_quietly(self.llvm_push())
+ pushed = self.run_with_output(self.llvm_push())
remote_branch = "linaro-local/{}/{}".format(self.user, self.branch)
+ self.assertRegex(
+ pushed, "(.*\n)*Pushed to {}(.*\n)*".format(remote_branch))
for subproj in self.all_repos:
origin = self.get_origin_path(subproj)