This is an automated email from the ASF dual-hosted git repository. tvb pushed a commit to branch tlater/buildbox-run-userchroot in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit e3456583dd2764eb7954665b0f12197f4201a7b7 Author: Jürg Billeter <[email protected]> AuthorDate: Tue Nov 12 15:35:02 2019 +0100 testing/runcli.py: Add BST_CAS_STAGING_ROOT environment variable This is required for testing with userchroot to create staging directories in a system-specific prefix. --- src/buildstream/testing/runcli.py | 7 +++++++ tox.ini | 1 + 2 files changed, 8 insertions(+) diff --git a/src/buildstream/testing/runcli.py b/src/buildstream/testing/runcli.py index c0e278b..1e86860 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 b037e39..62737b0 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
