summaryrefslogtreecommitdiff
path: root/test/testenv
diff options
context:
space:
mode:
Diffstat (limited to 'test/testenv')
-rwxr-xr-xtest/testenv14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/testenv b/test/testenv
index 0c8c4a7..0448e33 100755
--- a/test/testenv
+++ b/test/testenv
@@ -1,5 +1,19 @@
#!/bin/bash
+NETWORK=true
+SUDO=true
+while [[ $# -gt 0 ]]; do
+ case "$1" in
+ --no-network) shift; unset NETWORK;;
+ --network) shift; NETWORK=true;;
+ --no-sudo) shift; unset SUDO;;
+ --sudo) shift; SUDO=true;;
+ --) shift; break;;
+ *) break;;
+ esac
+done
+export NETWORK SUDO
+
export TMPDIR="$(mktemp --tmpdir -d libretools-test.XXXXXXXXXX)"
trap "rm -rf '$TMPDIR'" EXIT
# Set up the install to work with