diff options
author | Johannes Sixt <j6t@kdbg.org> | 2009-03-11 21:17:26 +0100 |
---|---|---|
committer | Johannes Sixt <j6t@kdbg.org> | 2009-03-19 22:04:25 +0100 |
commit | f17e9fbbe919bc1f4ecaa35a9cb0869a5ec47fc0 (patch) | |
tree | 097f214b3bb85a306bb52358b32ac05c4e6bdb40 /t | |
parent | a8cbc9ab027dce3d99d0039a02ec9df0f0c7ebb1 (diff) | |
download | git-f17e9fbbe919bc1f4ecaa35a9cb0869a5ec47fc0.tar.gz |
test-lib: Work around incompatible sort and find on Windows
If the PATH lists the Windows system directories before the MSYS
directories, Windows's own incompatible sort and find commands would be
picked up. We implement these commands as functions and call the real
tools by absolute path.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Diffstat (limited to 't')
-rw-r--r-- | t/test-lib.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 638cca41e3..4eda5aba4b 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -635,3 +635,16 @@ do test_done esac done + +# Fix some commands on Windows +case $(uname -s) in +*MINGW*) + # Windows has its own (incompatible) sort and find + sort () { + /usr/bin/sort "$@" + } + find () { + /usr/bin/find "$@" + } + ;; +esac |