Skip to content

Commit a05b71a

Browse files
nipunn1313gitster
authored andcommitted
t/perf/fsmonitor: factor setup for fsmonitor into function
This prepares for it being called multiple times when testing different hooks Signed-off-by: Nipunn Koorapati <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 78ff8b3 commit a05b71a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

t/perf/p7519-fsmonitor.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ test_expect_success "one time repo setup" '
103103
fi
104104
'
105105

106-
test_expect_success "setup for fsmonitor" '
106+
setup_for_fsmonitor() {
107107
# set INTEGRATION_SCRIPT depending on the environment
108108
if test -n "$GIT_PERF_7519_FSMONITOR"
109109
then
@@ -130,7 +130,7 @@ test_expect_success "setup for fsmonitor" '
130130
cat error &&
131131
[ ! -s error ] && # ensure no silent error
132132
git status # Warm caches
133-
'
133+
}
134134

135135
test_perf_w_drop_caches () {
136136
if test -n "$GIT_PERF_7519_DROP_CACHE"; then
@@ -188,6 +188,10 @@ test_fsmonitor_suite() {
188188
'
189189
}
190190

191+
test_expect_success "setup for fsmonitor" '
192+
setup_for_fsmonitor
193+
'
194+
191195
test_fsmonitor_suite
192196

193197
test_expect_success "setup without fsmonitor" '

0 commit comments

Comments
 (0)