diff options
Diffstat (limited to 'buildstream/plugintestutils/runcli.py')
-rw-r--r-- | buildstream/plugintestutils/runcli.py | 20 |
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 |