diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-09-04 18:00:11 -0400 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-09-05 01:59:27 -0400 |
commit | a01707e70764f9e43b012f05f28f1c0e3f4f26a5 (patch) | |
tree | febbf482d81431ffd7dbd946caf9b9cd34c3a46f | |
parent | c586dd5a8028cf756d4896afdd27218bf25f6cb7 (diff) | |
download | buildstream-a01707e70764f9e43b012f05f28f1c0e3f4f26a5.tar.gz |
tests/testutils/runcli.py: Added get_element_key() method to fetch cache key
-rw-r--r-- | tests/testutils/runcli.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/testutils/runcli.py b/tests/testutils/runcli.py index 11e562179..c4b7b7770 100644 --- a/tests/testutils/runcli.py +++ b/tests/testutils/runcli.py @@ -81,6 +81,19 @@ class Cli(): assert result.exit_code == 0 return result.output.strip() + # Fetch an element's cache key by invoking bst show + # on the project with the CLI + # + def get_element_key(self, project, element_name): + result = self.run(project=project, silent=True, args=[ + 'show', + '--deps', 'none', + '--format', '%{full-key}', + element_name + ]) + assert result.exit_code == 0 + return result.output.strip() + # Main fixture # |