summaryrefslogtreecommitdiff
path: root/buildstream/plugintestutils/runcli.py
diff options
context:
space:
mode:
authorTom Pollard <tom.pollard@codethink.co.uk>2018-12-05 17:45:38 +0000
committerTom Pollard <tom.pollard@codethink.co.uk>2019-02-12 13:06:58 +0000
commita739e4ac58ea0af334117f362f605666d593745a (patch)
treefef92c6bc35e5225018b70177b427ec68934df0a /buildstream/plugintestutils/runcli.py
parent86a9048a587f67fbb562f1188f9d04db0c220f75 (diff)
downloadbuildstream-tpollard/566.tar.gz
WIP: Make uploading of build trees configurabletpollard/566
Diffstat (limited to 'buildstream/plugintestutils/runcli.py')
-rw-r--r--buildstream/plugintestutils/runcli.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/buildstream/plugintestutils/runcli.py b/buildstream/plugintestutils/runcli.py
index fb7c23c6c..bd2f1e43e 100644
--- a/buildstream/plugintestutils/runcli.py
+++ b/buildstream/plugintestutils/runcli.py
@@ -238,6 +238,13 @@ class Result():
return list(pushed)
+ def get_partial_pushed_elements(self):
+ pushed = re.findall(r'\[\s*push:(\S+)\s*\]\s*INFO\s*Pushed partial artifact', self.stderr)
+ if pushed is None:
+ return []
+
+ return list(pushed)
+
def get_pulled_elements(self):
pulled = re.findall(r'\[\s*pull:(\S+)\s*\]\s*INFO\s*Pulled artifact', self.stderr)
if pulled is None:
@@ -245,6 +252,13 @@ class Result():
return list(pulled)
+ def get_partial_pulled_elements(self):
+ pulled = re.findall(r'\[\s*pull:(\S+)\s*\]\s*INFO\s*Pulled partial artifact', self.stderr)
+ if pulled is None:
+ return []
+
+ return list(pulled)
+
class Cli():
@@ -265,11 +279,15 @@ class Cli():
#
# Args:
# config (dict): The user configuration to use
+ # reset (bool): Optional reset of stored config
#
- def configure(self, config):
+ def configure(self, config, reset=False):
if self.config is None:
self.config = {}
+ if reset:
+ self.config.clear()
+
for key, val in config.items():
self.config[key] = val