You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:37:33 UTC
[buildstream] 02/10: testing/_utils/site.py: Add BUILDBOX_RUN
variable
This is an automated email from the ASF dual-hosted git repository.
not-in-ldap pushed a commit to branch tlater/buildbox-run-userchroot
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit e1204a1a4e8b25c763ec7e2e6bb301a11d3c77f6
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Thu Dec 5 05:52:33 2019 +0100
testing/_utils/site.py: Add BUILDBOX_RUN variable
---
src/buildstream/testing/_utils/site.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/buildstream/testing/_utils/site.py b/src/buildstream/testing/_utils/site.py
index f3b45db..9fbddf1 100644
--- a/src/buildstream/testing/_utils/site.py
+++ b/src/buildstream/testing/_utils/site.py
@@ -82,3 +82,12 @@ if HAVE_SANDBOX is not None:
pass
elif IS_LINUX and HAVE_BWRAP and (not IS_WSL):
HAVE_SANDBOX = "bwrap"
+
+
+BUILDBOX_RUN = None
+if HAVE_SANDBOX == "buildbox-run":
+ try:
+ path = utils.get_host_tool("buildbox-run")
+ BUILDBOX_RUN = os.path.basename(os.readlink(path))
+ except (ProgramNotFoundError, OSError):
+ pass