]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Have checkSpaceTest.sh exit as skipped when on Windows
authorNick Mathewson <nickm@torproject.org>
Mon, 2 Dec 2019 17:43:10 +0000 (12:43 -0500)
committerteor <teor@torproject.org>
Tue, 3 Dec 2019 02:56:50 +0000 (12:56 +1000)
Managing line-ending issues for this one isn't worth it.

scripts/maint/checkSpaceTest.sh

index a1eea58ebcfde07bc955e0531f695ebfd7aeff98..e1d207a1a825c0e2f14a9d3659d230ed5cef44e6 100755 (executable)
@@ -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