@@ -141,7 +141,7 @@ test_expect_success "one time repo setup" '
141
141
fi
142
142
'
143
143
144
- setup_for_fsmonitor () {
144
+ setup_for_fsmonitor_hook () {
145
145
# set INTEGRATION_SCRIPT depending on the environment
146
146
if test -n " $INTEGRATION_PATH "
147
147
then
@@ -182,7 +182,11 @@ test_perf_w_drop_caches () {
182
182
}
183
183
184
184
test_fsmonitor_suite () {
185
- if test -n " $INTEGRATION_SCRIPT " ; then
185
+ if test -n " $USE_FSMONITOR_DAEMON "
186
+ then
187
+ DESC=" builtin fsmonitor--daemon"
188
+ elif test -n " $INTEGRATION_SCRIPT "
189
+ then
186
190
DESC=" fsmonitor=$( basename $INTEGRATION_SCRIPT ) "
187
191
else
188
192
DESC=" fsmonitor=disabled"
@@ -261,11 +265,11 @@ test_fsmonitor_suite () {
261
265
trace_start fsmonitor-watchman
262
266
if test -n " $GIT_PERF_7519_FSMONITOR " ; then
263
267
for INTEGRATION_PATH in $GIT_PERF_7519_FSMONITOR ; do
264
- test_expect_success " setup for fsmonitor $INTEGRATION_PATH " ' setup_for_fsmonitor '
268
+ test_expect_success " setup for fsmonitor $INTEGRATION_PATH " ' setup_for_fsmonitor_hook '
265
269
test_fsmonitor_suite
266
270
done
267
271
else
268
- test_expect_success " setup for fsmonitor" ' setup_for_fsmonitor '
272
+ test_expect_success " setup for fsmonitor hook " ' setup_for_fsmonitor_hook '
269
273
test_fsmonitor_suite
270
274
fi
271
275
@@ -293,4 +297,30 @@ test_expect_success "setup without fsmonitor" '
293
297
test_fsmonitor_suite
294
298
trace_stop
295
299
300
+ #
301
+ # Run a full set of perf tests using the built-in fsmonitor--daemon.
302
+ # It does not use the Hook API, so it has a different setup.
303
+ # Explicitly start the daemon here and before we start client commands
304
+ # so that we can later add custom tracing.
305
+ #
306
+ if test_have_prereq FSMONITOR_DAEMON
307
+ then
308
+ USE_FSMONITOR_DAEMON=t
309
+
310
+ test_expect_success " setup for builtin fsmonitor" '
311
+ trace_start fsmonitor--daemon--server &&
312
+ git fsmonitor--daemon start &&
313
+
314
+ trace_start fsmonitor--daemon--client &&
315
+
316
+ git config core.fsmonitor true &&
317
+ git update-index --fsmonitor
318
+ '
319
+
320
+ test_fsmonitor_suite
321
+
322
+ git fsmonitor--daemon stop
323
+ trace_stop
324
+ fi
325
+
296
326
test_done
0 commit comments