Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2021-05-24 22:55:07 +0300
committerJunio C Hamano <gitster@pobox.com>2021-05-25 09:30:33 +0300
commite2b05746e15bad24803300122f2d95118617ca60 (patch)
tree11253e731d0ada8e845053088f7a2bc73fbdc289 /t/t1092-sparse-checkout-compatibility.sh
parentde88ac70f3a801262eb3aa087e5d9a712be0a54a (diff)
t1092: use GIT_PROGRESS_DELAY for consistent results
The t1092-sparse-checkout-compatibility.sh tests compare the stdout and stderr for several Git commands across both full checkouts, sparse checkouts with a full index, and sparse checkouts with a sparse index. Since these are direct comparisons, sometimes a progress indicator can flush at unpredictable points, especially on slower machines. This causes the tests to be flaky. One standard way to avoid this is to add GIT_PROGRESS_DELAY=0 to the Git commands that are run, as this will force every progress indicator created with start_progress_delay() to be created immediately. However, there are some progress indicators that are created in the case of a full index that are not created with a sparse index. Moreover, their values may be different as those indexes have a different number of entries. Instead, use GIT_PROGRESS_DELAY=-1 (which will turn into UINT_MAX) to ensure that any reasonable machine running these tests would never display delayed progress indicators. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1092-sparse-checkout-compatibility.sh')
-rwxr-xr-xt/t1092-sparse-checkout-compatibility.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh
index 12e6c45302..58ac9377e4 100755
--- a/t/t1092-sparse-checkout-compatibility.sh
+++ b/t/t1092-sparse-checkout-compatibility.sh
@@ -106,18 +106,18 @@ init_repos () {
run_on_sparse () {
(
cd sparse-checkout &&
- "$@" >../sparse-checkout-out 2>../sparse-checkout-err
+ GIT_PROGRESS_DELAY=-1 "$@" >../sparse-checkout-out 2>../sparse-checkout-err
) &&
(
cd sparse-index &&
- "$@" >../sparse-index-out 2>../sparse-index-err
+ GIT_PROGRESS_DELAY=-1 "$@" >../sparse-index-out 2>../sparse-index-err
)
}
run_on_all () {
(
cd full-checkout &&
- "$@" >../full-checkout-out 2>../full-checkout-err
+ GIT_PROGRESS_DELAY=-1 "$@" >../full-checkout-out 2>../full-checkout-err
) &&
run_on_sparse "$@"
}