diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2019-05-06 19:15:52 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2019-05-06 11:10:12 +0000 |
commit | d031349a5f82882bff1067b11bdc40d13bb6fe46 (patch) | |
tree | 2df2d8f29119fde2196d06c437d721079966bf48 /buildstream | |
parent | 8f76b75f1991d4438542c04012ee286c702cd1cb (diff) | |
download | buildstream-d031349a5f82882bff1067b11bdc40d13bb6fe46.tar.gz |
testing/runcli.py: Fix remove_artifact_from_cache() to work with subdirs.
The artifact directories are based on the element normal_name, which
substitutes any path separators with dashes.
Fix the helper function to use the correct path.
Diffstat (limited to 'buildstream')
-rw-r--r-- | buildstream/testing/runcli.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/testing/runcli.py b/buildstream/testing/runcli.py index 72bdce09e..934c31236 100644 --- a/buildstream/testing/runcli.py +++ b/buildstream/testing/runcli.py @@ -637,8 +637,8 @@ class TestArtifact(): def remove_artifact_from_cache(self, cache_dir, element_name): cache_dir = os.path.join(cache_dir, 'cas', 'refs', 'heads') - - cache_dir = os.path.splitext(os.path.join(cache_dir, 'test', element_name))[0] + normal_name = element_name.replace(os.sep, '-') + cache_dir = os.path.splitext(os.path.join(cache_dir, 'test', normal_name))[0] shutil.rmtree(cache_dir) # is_cached(): |