Skip to content

Commit a7556c3

Browse files
jeffhostetlergitster
authored andcommitted
p7519: move watchman cleanup earlier in the test
Shutdown Watchman after the Watchman-based tests and before the block of "no fsmonitor" tests. This helps ensure that Watchman cannot affect the test results for the other. Signed-off-by: Jeff Hostetler <[email protected]> Reviewed-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0917763 commit a7556c3

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

t/perf/p7519-fsmonitor.sh

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,11 @@ test_fsmonitor_suite() {
208208
'
209209
}
210210

211+
#
212+
# Run a full set of perf tests using each Hook-based fsmonitor provider,
213+
# such as Watchman.
214+
#
215+
211216
if test -n "$GIT_PERF_7519_FSMONITOR"; then
212217
for INTEGRATION_PATH in $GIT_PERF_7519_FSMONITOR; do
213218
test_expect_success "setup for fsmonitor $INTEGRATION_PATH" 'setup_for_fsmonitor'
@@ -218,14 +223,6 @@ else
218223
test_fsmonitor_suite
219224
fi
220225

221-
test_expect_success "setup without fsmonitor" '
222-
unset INTEGRATION_SCRIPT &&
223-
git config --unset core.fsmonitor &&
224-
git update-index --no-fsmonitor
225-
'
226-
227-
test_fsmonitor_suite
228-
229226
if test_have_prereq WATCHMAN
230227
then
231228
watchman watch-del "$GIT_WORK_TREE" >/dev/null 2>&1 &&
@@ -235,4 +232,16 @@ then
235232
watchman shutdown-server >/dev/null 2>&1
236233
fi
237234

235+
#
236+
# Run a full set of perf tests with the fsmonitor feature disabled.
237+
#
238+
239+
test_expect_success "setup without fsmonitor" '
240+
unset INTEGRATION_SCRIPT &&
241+
git config --unset core.fsmonitor &&
242+
git update-index --no-fsmonitor
243+
'
244+
245+
test_fsmonitor_suite
246+
238247
test_done

0 commit comments

Comments
 (0)