]> git.ipfire.org Git - thirdparty/git.git/commitdiff
p7519: fix watchman watch-list test on Windows
authorJeff Hostetler <jeffhost@microsoft.com>
Wed, 3 Feb 2021 15:34:41 +0000 (15:34 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Feb 2021 01:14:34 +0000 (17:14 -0800)
Only use the final portion of the test trash directory file name
when verifying that Watchman was started.

On Windows and under the SDK, $GIT_WORKTREE is a cygwin-style
path with forward slashes and a "/c/" drive name.  However
`watchman watch-list` reports a proper Windows-style pathname
with drive letters and backslashes.  This causes the grep to
fail.  Since we don't really care about the full pathname (and
we really don't want to bother with normalizaing them), just see
if the test-name portion of the path is found.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/perf/p7519-fsmonitor.sh

index 6677e0ef7ab33449f52e9db5a4f72639311311d0..21d525541d5932d0ffec3c64c48f03920f5537c1 100755 (executable)
@@ -101,7 +101,7 @@ test_expect_success "one time repo setup" '
        # If Watchman exists, watch the work tree and attempt a query.
        if test_have_prereq WATCHMAN; then
                watchman watch "$GIT_WORK_TREE" &&
-               watchman watch-list | grep -q -F "$GIT_WORK_TREE"
+               watchman watch-list | grep -q -F "p7519-fsmonitor"
        fi
 '