mirror of
https://github.com/git/git.git
synced 2024-12-13 20:06:31 +08:00
Merge branch 'ds/trace2-regions-in-tests'
The default setting for trace2 event nesting was too low to cause test failures, which is worked around by bumping it up in the test framework. * ds/trace2-regions-in-tests: t/t*: remove custom GIT_TRACE2_EVENT_NESTING test-lib.sh: set GIT_TRACE2_EVENT_NESTING
This commit is contained in:
commit
62329d336f
@ -784,7 +784,7 @@ test_expect_success 'submodule handling' '
|
||||
test_expect_success 'sparse-index is expanded and converted back' '
|
||||
init_repos &&
|
||||
|
||||
GIT_TRACE2_EVENT="$(pwd)/trace2.txt" GIT_TRACE2_EVENT_NESTING=10 \
|
||||
GIT_TRACE2_EVENT="$(pwd)/trace2.txt" \
|
||||
git -C sparse-index reset -- folder1/a &&
|
||||
test_region index convert_to_sparse trace2.txt &&
|
||||
test_region index ensure_full_index trace2.txt
|
||||
@ -829,10 +829,10 @@ ensure_not_expanded () {
|
||||
then
|
||||
shift &&
|
||||
test_must_fail env \
|
||||
GIT_TRACE2_EVENT="$(pwd)/trace2.txt" GIT_TRACE2_EVENT_NESTING=10 \
|
||||
GIT_TRACE2_EVENT="$(pwd)/trace2.txt" \
|
||||
git -C sparse-index "$@" || return 1
|
||||
else
|
||||
GIT_TRACE2_EVENT="$(pwd)/trace2.txt" GIT_TRACE2_EVENT_NESTING=10 \
|
||||
GIT_TRACE2_EVENT="$(pwd)/trace2.txt" \
|
||||
git -C sparse-index "$@" || return 1
|
||||
fi &&
|
||||
test_region ! index ensure_full_index trace2.txt
|
||||
|
@ -175,13 +175,11 @@ test_expect_success 'persist filter settings' '
|
||||
test_when_finished rm -rf .git/objects/info/commit-graph* &&
|
||||
rm -rf .git/objects/info/commit-graph* &&
|
||||
GIT_TRACE2_EVENT="$(pwd)/trace2.txt" \
|
||||
GIT_TRACE2_EVENT_NESTING=5 \
|
||||
GIT_TEST_BLOOM_SETTINGS_NUM_HASHES=9 \
|
||||
GIT_TEST_BLOOM_SETTINGS_BITS_PER_ENTRY=15 \
|
||||
git commit-graph write --reachable --changed-paths &&
|
||||
grep "{\"hash_version\":1,\"num_hashes\":9,\"bits_per_entry\":15,\"max_changed_paths\":512" trace2.txt &&
|
||||
GIT_TRACE2_EVENT="$(pwd)/trace2-auto.txt" \
|
||||
GIT_TRACE2_EVENT_NESTING=5 \
|
||||
git commit-graph write --reachable --changed-paths &&
|
||||
grep "{\"hash_version\":1,\"num_hashes\":9,\"bits_per_entry\":15,\"max_changed_paths\":512" trace2-auto.txt
|
||||
'
|
||||
|
@ -35,7 +35,7 @@ test_expect_success 'setup writing bitmaps during repack' '
|
||||
'
|
||||
|
||||
test_expect_success 'full repack creates bitmaps' '
|
||||
GIT_TRACE2_EVENT_NESTING=4 GIT_TRACE2_EVENT="$(pwd)/trace" \
|
||||
GIT_TRACE2_EVENT="$(pwd)/trace" \
|
||||
git repack -ad &&
|
||||
ls .git/objects/pack/ | grep bitmap >output &&
|
||||
test_line_count = 1 output &&
|
||||
|
@ -32,7 +32,6 @@ do
|
||||
test_when_finished "git -C local push --delete origin new-branch" &&
|
||||
cp -r "$LOCAL_PRISTINE" local &&
|
||||
git -C local pull --no-rebase origin &&
|
||||
GIT_TRACE2_EVENT_NESTING=5 \
|
||||
GIT_TRACE2_EVENT="$(pwd)/tr2-client-events" \
|
||||
git -c protocol.version=$PROTO -C local push \
|
||||
--receive-pack "GIT_TRACE2_EVENT=\"$(pwd)/tr2-server-events\" git-receive-pack" \
|
||||
@ -65,7 +64,6 @@ do
|
||||
test_when_finished "git -C local push --delete origin new-branch" &&
|
||||
cp -r "$LOCAL_PRISTINE" local &&
|
||||
git -C local pull --no-rebase origin &&
|
||||
GIT_TRACE2_EVENT_NESTING=5 \
|
||||
GIT_TRACE2_EVENT="$(pwd)/tr2-client-events" \
|
||||
git -c protocol.version=$PROTO -C local push \
|
||||
--receive-pack "GIT_TRACE2_EVENT=\"$(pwd)/tr2-server-events\" git-receive-pack" \
|
||||
|
@ -390,7 +390,7 @@ test_expect_success 'status succeeds after staging/unstaging' '
|
||||
# during a call to 'git status'. Otherwise, we verify that we _do_ call it.
|
||||
check_sparse_index_behavior () {
|
||||
git -C full status --porcelain=v2 >expect &&
|
||||
GIT_TRACE2_EVENT="$(pwd)/trace2.txt" GIT_TRACE2_EVENT_NESTING=10 \
|
||||
GIT_TRACE2_EVENT="$(pwd)/trace2.txt" \
|
||||
git -C sparse status --porcelain=v2 >actual &&
|
||||
test_region $1 index ensure_full_index trace2.txt &&
|
||||
test_region fsm_hook query trace2.txt &&
|
||||
|
@ -476,6 +476,13 @@ export GIT_TEST_MERGE_ALGORITHM
|
||||
GIT_TRACE_BARE=1
|
||||
export GIT_TRACE_BARE
|
||||
|
||||
# Some tests scan the GIT_TRACE2_EVENT feed for events, but the
|
||||
# default depth is 2, which frequently causes issues when the
|
||||
# events are wrapped in new regions. Set it to a sufficiently
|
||||
# large depth to avoid custom changes in the test suite.
|
||||
GIT_TRACE2_EVENT_NESTING=100
|
||||
export GIT_TRACE2_EVENT_NESTING
|
||||
|
||||
# Use specific version of the index file format
|
||||
if test -n "${GIT_TEST_INDEX_VERSION:+isset}"
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user