summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-12-02 12:43:10 -0500
committerteor <teor@torproject.org>2019-12-03 12:56:50 +1000
commit8a10a7487006b24849999858d3d3a8db491859ca (patch)
tree5870f90d17740d062cb73beccd8cc696c24176e4 /scripts
parentbd61a4e84891027dfabba6be62886f3baeb41e27 (diff)
downloadtor-8a10a7487006b24849999858d3d3a8db491859ca.tar.gz
tor-8a10a7487006b24849999858d3d3a8db491859ca.zip
Have checkSpaceTest.sh exit as skipped when on Windows
Managing line-ending issues for this one isn't worth it.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maint/checkSpaceTest.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/maint/checkSpaceTest.sh b/scripts/maint/checkSpaceTest.sh
index a1eea58ebc..e1d207a1a8 100755
--- a/scripts/maint/checkSpaceTest.sh
+++ b/scripts/maint/checkSpaceTest.sh
@@ -7,6 +7,19 @@
umask 077
set -e
+# Skip this test if we're running on Windows; we expect line-ending
+# issues in that case.
+case "$(uname -s)" in
+ CYGWIN*) WINDOWS=1;;
+ MINGW*) WINDOWS=1;;
+ MSYS*) WINDOWS=1;;
+ *) WINDOWS=0;;
+esac
+if test "$WINDOWS" = 1; then
+ # This magic value tells automake that the test has been skipped.
+ exit 77
+fi
+
# make a safe space for temporary files
DATA_DIR=$(mktemp -d -t tor_checkspace_tests.XXXXXX)
trap 'rm -rf "$DATA_DIR"' 0