git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jeff Hostetler via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Jeff Hostetler <jeffhost@microsoft.com>,
	Jeff Hostetler <jeffhost@microsoft.com>
Subject: [PATCH 07/16] t/perf/p7519: cleanup coding style
Date: Fri, 11 Mar 2022 21:14:54 +0000	[thread overview]
Message-ID: <3482fb79a517d4703b5aa888a8c3d4890d034cf7.1647033303.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1174.git.1647033303.gitgitgadget@gmail.com>

From: Jeff Hostetler <jeffhost@microsoft.com>

fixup! t/perf/p7519: add fsmonitor--daemon test cases

Add "_hook" to name of shell function to set up for Watchman/hook test runs.

Fix code style of added "if then".

Add body of builtin test to a test_expect_success.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
---
 t/perf/p7519-fsmonitor.sh | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh
index 5f97edf6a11..7a7981b0e61 100755
--- a/t/perf/p7519-fsmonitor.sh
+++ b/t/perf/p7519-fsmonitor.sh
@@ -141,7 +141,7 @@ test_expect_success "one time repo setup" '
 	fi
 '
 
-setup_for_fsmonitor () {
+setup_for_fsmonitor_hook () {
 	# set INTEGRATION_SCRIPT depending on the environment
 	if test -n "$INTEGRATION_PATH"
 	then
@@ -182,8 +182,7 @@ test_perf_w_drop_caches () {
 }
 
 test_fsmonitor_suite () {
-	if test -n "$USE_FSMONITOR_DAEMON"
-	then
+	if test -n "$USE_FSMONITOR_DAEMON"; then
 		DESC="builtin fsmonitor--daemon"
 	elif test -n "$INTEGRATION_SCRIPT"; then
 		DESC="fsmonitor=$(basename $INTEGRATION_SCRIPT)"
@@ -264,11 +263,11 @@ test_fsmonitor_suite () {
 trace_start fsmonitor-watchman
 if test -n "$GIT_PERF_7519_FSMONITOR"; then
 	for INTEGRATION_PATH in $GIT_PERF_7519_FSMONITOR; do
-		test_expect_success "setup for fsmonitor $INTEGRATION_PATH" 'setup_for_fsmonitor'
+		test_expect_success "setup for fsmonitor $INTEGRATION_PATH" 'setup_for_fsmonitor_hook'
 		test_fsmonitor_suite
 	done
 else
-	test_expect_success "setup for fsmonitor" 'setup_for_fsmonitor'
+	test_expect_success "setup for fsmonitor hook" 'setup_for_fsmonitor_hook'
 	test_fsmonitor_suite
 fi
 
@@ -306,13 +305,15 @@ if test_have_prereq FSMONITOR_DAEMON
 then
 	USE_FSMONITOR_DAEMON=t
 
-	trace_start fsmonitor--daemon--server
-	git fsmonitor--daemon start
+	test_expect_success "setup for builtin fsmonitor" '
+		trace_start fsmonitor--daemon--server &&
+		git fsmonitor--daemon start &&
 
-	trace_start fsmonitor--daemon--client
+		trace_start fsmonitor--daemon--client &&
 
-	git config core.fsmonitor true
-	git update-index --fsmonitor
+		git config core.fsmonitor true &&
+		git update-index --fsmonitor
+	'
 
 	test_fsmonitor_suite
 
-- 
gitgitgadget


  parent reply	other threads:[~2022-03-11 22:52 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 21:14 [PATCH 00/16] Builtin FSMonitor Part 2.5 Jeff Hostetler via GitGitGadget
2022-03-11 21:14 ` [PATCH 01/16] t/test-lib: avoid using git on LHS of pipe Jeff Hostetler via GitGitGadget
2022-03-14  6:00   ` Junio C Hamano
2022-03-11 21:14 ` [PATCH 02/16] update-index: convert advise() messages back to warning() Jeff Hostetler via GitGitGadget
2022-03-14  6:08   ` Junio C Hamano
2022-03-21 18:47     ` Jeff Hostetler
2022-03-11 21:14 ` [PATCH 03/16] compat/fsmonitor/fsm-listen-darwin: split out GCC-specific declarations Jeff Hostetler via GitGitGadget
2022-03-11 21:14 ` [PATCH 04/16] t/helper/fsmonitor-client: cleanup call to parse_options() Jeff Hostetler via GitGitGadget
2022-03-14  7:58   ` Ævar Arnfjörð Bjarmason
2022-03-11 21:14 ` [PATCH 05/16] fsmonitor--daemon: refactor cookie handling for readability Jeff Hostetler via GitGitGadget
2022-03-14  8:00   ` Ævar Arnfjörð Bjarmason
2022-03-14 14:49     ` Derrick Stolee
2022-03-14 17:47       ` Junio C Hamano
2022-03-21 19:26         ` Jeff Hostetler
2022-03-11 21:14 ` [PATCH 06/16] t/perf/p7519: use grep rather than egrep in test Jeff Hostetler via GitGitGadget
2022-03-11 21:14 ` Jeff Hostetler via GitGitGadget [this message]
2022-03-14  8:01   ` [PATCH 07/16] t/perf/p7519: cleanup coding style Ævar Arnfjörð Bjarmason
2022-03-11 21:14 ` [PATCH 08/16] t7527: add parameters to start_daemon to handle args and subshell Jeff Hostetler via GitGitGadget
2022-03-14  8:03   ` Ævar Arnfjörð Bjarmason
2022-03-11 21:14 ` [PATCH 09/16] t7527: fix && chaining in matrix_try() Jeff Hostetler via GitGitGadget
2022-03-14  6:15   ` Junio C Hamano
2022-03-11 21:14 ` [PATCH 10/16] t7527: delete unused verify_status() function Jeff Hostetler via GitGitGadget
2022-03-11 21:14 ` [PATCH 11/16] fsmonitor-ipc: add _() to calls to die() Jeff Hostetler via GitGitGadget
2022-03-11 21:14 ` [PATCH 12/16] compat/fsmonitor/fsm-listen-darwin: add _() to calls to error() Jeff Hostetler via GitGitGadget
2022-03-11 21:15 ` [PATCH 13/16] compat/fsmonitor/fsm-listen-win32: " Jeff Hostetler via GitGitGadget
2022-03-11 21:15 ` [PATCH 14/16] fsmonitor--daemon: add _() to calls to die() Jeff Hostetler via GitGitGadget
2022-03-11 21:15 ` [PATCH 15/16] fsmonitor--daemon: add _() to calls to error() Jeff Hostetler via GitGitGadget
2022-03-11 21:15 ` [PATCH 16/16] fsmonitor-settings: simplify initialization of settings data Jeff Hostetler via GitGitGadget
2022-03-14 19:49   ` Junio C Hamano
2022-03-15 18:26     ` Jeff Hostetler
2022-03-15 19:06       ` Junio C Hamano
2022-03-13  8:02 ` [PATCH 00/16] Builtin FSMonitor Part 2.5 Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3482fb79a517d4703b5aa888a8c3d4890d034cf7.1647033303.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jeffhost@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).