summaryrefslogtreecommitdiffhomepage
path: root/integration-tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'integration-tests.sh')
-rwxr-xr-xintegration-tests.sh19
1 files changed, 16 insertions, 3 deletions
diff --git a/integration-tests.sh b/integration-tests.sh
index f69614109f..4de1085972 100755
--- a/integration-tests.sh
+++ b/integration-tests.sh
@@ -1,8 +1,21 @@
#!/usr/bin/env bash
-if [ "$UID" -ne 0 ]; then
- echo "WARNING: Not running as root, some tests may fail" >&2
-fi
+case "$(uname -s)" in
+ Linux*)
+ if [ "$UID" -ne 0 ]; then
+ echo "WARNING: Not running as root, some tests may fail" >&2
+ fi
+ ;;
+ MINGW*)
+ if ! net session &> /dev/null; then
+ echo "WARNING: Not running as administrator, some tests may fail" >&2
+ fi
+ ;;
+ *)
+ echo "ERROR: Platform $OSTYPE not supported"
+ exit 1
+ ;;
+esac
MULLVAD_DIR="$(cd "$(dirname "$0")"; pwd -P)"