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 <nipunn@dropbox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
78ff8b3236
commit
a05b71ab91
@ -103,7 +103,7 @@ test_expect_success "one time repo setup" '
|
|||||||
fi
|
fi
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "setup for fsmonitor" '
|
setup_for_fsmonitor() {
|
||||||
# set INTEGRATION_SCRIPT depending on the environment
|
# set INTEGRATION_SCRIPT depending on the environment
|
||||||
if test -n "$GIT_PERF_7519_FSMONITOR"
|
if test -n "$GIT_PERF_7519_FSMONITOR"
|
||||||
then
|
then
|
||||||
@ -130,7 +130,7 @@ test_expect_success "setup for fsmonitor" '
|
|||||||
cat error &&
|
cat error &&
|
||||||
[ ! -s error ] && # ensure no silent error
|
[ ! -s error ] && # ensure no silent error
|
||||||
git status # Warm caches
|
git status # Warm caches
|
||||||
'
|
}
|
||||||
|
|
||||||
test_perf_w_drop_caches () {
|
test_perf_w_drop_caches () {
|
||||||
if test -n "$GIT_PERF_7519_DROP_CACHE"; then
|
if test -n "$GIT_PERF_7519_DROP_CACHE"; then
|
||||||
@ -188,6 +188,10 @@ test_fsmonitor_suite() {
|
|||||||
'
|
'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test_expect_success "setup for fsmonitor" '
|
||||||
|
setup_for_fsmonitor
|
||||||
|
'
|
||||||
|
|
||||||
test_fsmonitor_suite
|
test_fsmonitor_suite
|
||||||
|
|
||||||
test_expect_success "setup without fsmonitor" '
|
test_expect_success "setup without fsmonitor" '
|
||||||
|
Loading…
Reference in New Issue
Block a user