diff options
author | Eric Wong <e@80x24.org> | 2021-10-29 02:15:52 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-29 19:22:40 +0200 |
commit | 412e4caee387d825903bf1252aefbd5cf995a599 (patch) | |
tree | 3a2104c1ac2fd9c9630d2ab02ea1dfc7ea8cadc8 /t | |
parent | Git 2.33.1 (diff) | |
download | git-412e4caee387d825903bf1252aefbd5cf995a599.tar.xz git-412e4caee387d825903bf1252aefbd5cf995a599.zip |
tests: disable fsync everywhere
The "GIT_TEST_FSYNC" environment variable now exists for
disabling fsync() even on packfiles and other "critical" data.
Running "make test -j8 NO_SVN_TESTS=1" on a noisy 8-core system
on an HDD, test runtime drops from ~4 minutes down to ~3 minutes.
Using "GIT_TEST_FSYNC=1" re-enables fsync() for comparison
purposes.
SVN interopability tests are minimally affected since SVN will
still use fsync in various places.
This will also be useful for 3rd-party tools which create
throwaway git repositories of temporary data, but remains
undocumented for end users.
Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r-- | t/test-lib.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index fc1e521519..57d1d84564 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -489,6 +489,13 @@ then export GIT_PERL_FATAL_WARNINGS fi +case $GIT_TEST_FSYNC in +'') + GIT_TEST_FSYNC=0 + export GIT_TEST_FSYNC + ;; +esac + # Add libc MALLOC and MALLOC_PERTURB test # only if we are not executing the test with valgrind if test -n "$valgrind" || |