summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buildstream/testing/runcli.py7
-rw-r--r--tox.ini1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/buildstream/testing/runcli.py b/src/buildstream/testing/runcli.py
index c0e278b11..1e868609a 100644
--- a/src/buildstream/testing/runcli.py
+++ b/src/buildstream/testing/runcli.py
@@ -842,6 +842,13 @@ def configured(directory, config=None):
if not config.get("logdir", False):
config["logdir"] = os.path.join(directory, "logs")
+ cas_stage_root = os.environ.get("BST_CAS_STAGING_ROOT")
+ if cas_stage_root:
+ symlink_path = os.path.join(config["cachedir"], "cas", "staging")
+ if not os.path.lexists(symlink_path):
+ os.makedirs(os.path.join(config["cachedir"], "cas"), exist_ok=True)
+ os.symlink(cas_stage_root, symlink_path)
+
# Dump it and yield the filename for test scripts to feed it
# to buildstream as an artument
filename = os.path.join(directory, "buildstream.conf")
diff --git a/tox.ini b/tox.ini
index b037e3984..62737b0ca 100644
--- a/tox.ini
+++ b/tox.ini
@@ -39,6 +39,7 @@ deps =
randomized: pytest-random-order
passenv =
ARTIFACT_CACHE_SERVICE
+ BST_CAS_STAGING_ROOT
BST_FORCE_BACKEND
BST_FORCE_SANDBOX
BST_FORCE_START_METHOD