diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-06-04 22:02:21 -0600 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-06-05 20:06:25 -0600 |
commit | a329839346a3c2c9591985b70841858dd575846f (patch) | |
tree | b7cbde15e7e46d42726058b9e318ce6a8e85c29c /test/testenv | |
parent | 695b9b8af8e2629d460d877abab4bdf216c71df2 (diff) |
add a system to skip tests that require networking or sudo.
Diffstat (limited to 'test/testenv')
-rwxr-xr-x | test/testenv | 14 |
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 |