Skip to content

Commit bb7cc7e

Browse files
nipunn1313gitster
authored andcommitted
t/perf/fsmonitor: separate one time repo initialization
In preparation for testing multiple fsmonitor hooks Signed-off-by: Nipunn Koorapati <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2bfa953 commit bb7cc7e

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

t/perf/p7519-fsmonitor.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ then
6868
fi
6969
fi
7070

71-
test_expect_success "setup for fsmonitor" '
71+
test_expect_success "one time repo setup" '
7272
# set untrackedCache depending on the environment
7373
if test -n "$GIT_PERF_7519_UNTRACKED_CACHE"
7474
then
@@ -88,6 +88,16 @@ test_expect_success "setup for fsmonitor" '
8888
git config core.splitIndex "$GIT_PERF_7519_SPLIT_INDEX"
8989
fi &&
9090
91+
mkdir 1_file 10_files 100_files 1000_files 10000_files &&
92+
for i in $(test_seq 1 10); do touch 10_files/$i; done &&
93+
for i in $(test_seq 1 100); do touch 100_files/$i; done &&
94+
for i in $(test_seq 1 1000); do touch 1000_files/$i; done &&
95+
for i in $(test_seq 1 10000); do touch 10000_files/$i; done &&
96+
git add 1_file 10_files 100_files 1000_files 10000_files &&
97+
git commit -m "Add files"
98+
'
99+
100+
test_expect_success "setup for fsmonitor" '
91101
# set INTEGRATION_SCRIPT depending on the environment
92102
if test -n "$GIT_PERF_7519_FSMONITOR"
93103
then
@@ -115,13 +125,6 @@ test_expect_success "setup for fsmonitor" '
115125
116126
git config core.fsmonitor "$INTEGRATION_SCRIPT" &&
117127
git update-index --fsmonitor &&
118-
mkdir 1_file 10_files 100_files 1000_files 10000_files &&
119-
for i in $(test_seq 1 10); do touch 10_files/$i; done &&
120-
for i in $(test_seq 1 100); do touch 100_files/$i; done &&
121-
for i in $(test_seq 1 1000); do touch 1000_files/$i; done &&
122-
for i in $(test_seq 1 10000); do touch 10000_files/$i; done &&
123-
git add 1_file 10_files 100_files 1000_files 10000_files &&
124-
git commit -m "Add files" &&
125128
git status # Warm caches
126129
'
127130

0 commit comments

Comments
 (0)