test-lib: add an EXPENSIVE_ON_WINDOWS prerequisite

Add an EXPENSIVE_ON_WINDOWS prerequisite to mark those tests which are very expensive to run on Windows, but cheap elsewhere. Certain tests that heavily stress the filesystem or run a lot of shell commands are disproportionately expensive on Windows, this prerequisite will later be used by a tests that runs in 4-8 seconds on a modern Linux system, but takes almost 10 minutes on Windows. There's no reason to skip such tests by default on other platforms, but Windows users shouldn't need to wait around while they finish. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Jan 30, 2018 at 21:21 UTC 5b1fe6ebb7ed494391a582c3fda37813fdbf28c4
1 file changed +4
t/test-lib.sh
+4
@@ -1109,6 +1109,10 @@ test_lazy_prereq EXPENSIVE '
1109 test -n "$GIT_TEST_LONG"
1110 '
1111
1112 +test_lazy_prereq EXPENSIVE_ON_WINDOWS '
1113 + test_have_prereq EXPENSIVE || test_have_prereq !MINGW,!CYGWIN
1114 +'
1115 +
1116 test_lazy_prereq USR_BIN_TIME '
1117 test -x /usr/bin/time
1118 '