You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ro...@apache.org on 2020/12/29 13:38:40 UTC

[buildstream] 09/20: Fixes to import_cas.py

This is an automated email from the ASF dual-hosted git repository.

root pushed a commit to branch jmac/virtual_directory_tests
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit d215220075b99e3680e41f0cbd246a9f30fe371f
Author: Jim MacArthur <ji...@codethink.co.uk>
AuthorDate: Sun Sep 16 10:57:01 2018 +0100

    Fixes to import_cas.py
---
 tests/storage/import_cas.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/storage/import_cas.py b/tests/storage/import_cas.py
index d7db43c..764df80 100644
--- a/tests/storage/import_cas.py
+++ b/tests/storage/import_cas.py
@@ -35,6 +35,10 @@ def generate_import_roots(directory):
             with open(os.path.join(directory, "content", rootname, dirnames, filename), "wt") as f:
                 f.write(content)
 
+def file_contents_are(path, contents):
+    with open(path, "r") as f:
+        result = f.read() == contents
+    return result
 
 def test_cas_import(cli, tmpdir):
     fake_context = FakeContext()