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 <jeffhost@microsoft.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff Hostetler committed Feb 3, 2021 at 15:34 UTC a7556c3bde48b9266f11794a20d12719269becd3
1 file changed +17 -8
t/perf/p7519-fsmonitor.sh
+17 -8
@@ -208,6 +208,11 @@ test_fsmonitor_suite() {
208 '
209 }
210
211 +#
212 +# Run a full set of perf tests using each Hook-based fsmonitor provider,
213 +# such as Watchman.
214 +#
215 +
216 if test -n "$GIT_PERF_7519_FSMONITOR"; then
217 for INTEGRATION_PATH in $GIT_PERF_7519_FSMONITOR; do
218 test_expect_success "setup for fsmonitor $INTEGRATION_PATH" 'setup_for_fsmonitor'
@@ -218,14 +223,6 @@ else
223 test_fsmonitor_suite
224 fi
225
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 -
226 if test_have_prereq WATCHMAN
227 then
228 watchman watch-del "$GIT_WORK_TREE" >/dev/null 2>&1 &&
@@ -235,4 +232,16 @@ then
232 watchman shutdown-server >/dev/null 2>&1
233 fi
234
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 +
247 test_done