diff options
author | Jürg Billeter <j@bitron.ch> | 2019-11-12 15:35:02 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-12-04 19:22:05 +0100 |
commit | 1cfeb3f028d6f5361d73e9349d987134542f5b55 (patch) | |
tree | 83b086f12e2f90ba497780c8eeadc499e60c9c39 | |
parent | bad2a1ebe15234566bc1526b044a82824d636846 (diff) | |
download | buildstream-1cfeb3f028d6f5361d73e9349d987134542f5b55.tar.gz |
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.
-rw-r--r-- | src/buildstream/testing/runcli.py | 7 | ||||
-rw-r--r-- | tox.ini | 1 |
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") @@ -36,6 +36,7 @@ deps = !nocover: -rrequirements/cov-requirements.txt passenv = ARTIFACT_CACHE_SERVICE + BST_CAS_STAGING_ROOT BST_FORCE_BACKEND BST_FORCE_SANDBOX BST_FORCE_START_METHOD |