aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Radford <benradf@users.noreply.github.com>2023-06-15 12:48:06 +0100
committerBen Radford <benradf@users.noreply.github.com>2023-07-11 12:08:33 +0100
commitc1d39de1fbceebbb6b46abc4a21fb8e34423df99 (patch)
treefed91fa3ccfbda5ff052b85a5c00adbec0498527
parentb8e8dfc3e8581a08bc179f75fbe61e04030088de (diff)
Check _NIX_TEST_NO_SANDBOX when setting _canUseSandbox.
-rw-r--r--tests/common/vars-and-functions.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/common/vars-and-functions.sh.in b/tests/common/vars-and-functions.sh.in
index dc7ce13cc..ad0623871 100644
--- a/tests/common/vars-and-functions.sh.in
+++ b/tests/common/vars-and-functions.sh.in
@@ -141,7 +141,7 @@ restartDaemon() {
startDaemon
}
-if [[ $(uname) == Linux ]] && [[ -L /proc/self/ns/user ]] && unshare --user true; then
+if [[ -z "${_NIX_TEST_NO_SANDBOX:-}" ]] && [[ $(uname) == Linux ]] && [[ -L /proc/self/ns/user ]] && unshare --user true; then
_canUseSandbox=1
fi