diff options
author | Jürg Billeter <j@bitron.ch> | 2019-11-21 07:38:31 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-12-03 12:06:31 +0000 |
commit | ae63515abb8b294eba0a5a64a05acb1439b299f0 (patch) | |
tree | 83de688af5f78ce66452e4b7a770fe4ee58d5842 | |
parent | 27ec82e3bc00e06800249deca61c7b2df620596c (diff) | |
download | buildstream-ae63515abb8b294eba0a5a64a05acb1439b299f0.tar.gz |
testing/_utils/site.py: Add CASD_SEPARATE_USER variable
This is set to True if buildbox-casd is installed with the set-uid bit
and thus, indicates whether buildbox-casd is running as a separate user.
-rw-r--r-- | src/buildstream/testing/_utils/site.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buildstream/testing/_utils/site.py b/src/buildstream/testing/_utils/site.py index 953d21607..5507df0f7 100644 --- a/src/buildstream/testing/_utils/site.py +++ b/src/buildstream/testing/_utils/site.py @@ -2,6 +2,7 @@ # so we dont have to repeat this everywhere # import os +import stat import subprocess import sys import platform @@ -65,6 +66,10 @@ try: except ImportError: HAVE_ARPY = False +casd_path = utils.get_host_tool("buildbox-casd") +CASD_SEPARATE_USER = bool(os.stat(casd_path).st_mode & stat.S_ISUID) +del casd_path + try: utils.get_host_tool("buildbox") HAVE_BUILDBOX = True |