summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-05-06 20:20:20 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-05-06 20:59:24 +0900
commit13c38e2d39958dc2ec34a241d867fa279c84fdae (patch)
treef5a755f58d96e82cecca37fa8f4b3456b0e1b47e
parent7c58d8aca51e10efbe9aacbf5df5ee11195dcc36 (diff)
downloadbuildstream-13c38e2d39958dc2ec34a241d867fa279c84fdae.tar.gz
tests/testutils/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.
-rw-r--r--tests/testutils/runcli.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/testutils/runcli.py b/tests/testutils/runcli.py
index 805b1192d..06f3f1c3a 100644
--- a/tests/testutils/runcli.py
+++ b/tests/testutils/runcli.py
@@ -218,8 +218,8 @@ class Cli():
cache_dir = os.path.join(project, 'cache', 'artifacts')
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)
# run():