Skip to content

Commit 0917763

Browse files
jeffhostetlergitster
authored andcommitted
p7519: fix watchman watch-list test on Windows
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 <[email protected]> Reviewed-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent eb10e63 commit 0917763

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/perf/p7519-fsmonitor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ test_expect_success "one time repo setup" '
101101
# If Watchman exists, watch the work tree and attempt a query.
102102
if test_have_prereq WATCHMAN; then
103103
watchman watch "$GIT_WORK_TREE" &&
104-
watchman watch-list | grep -q -F "$GIT_WORK_TREE"
104+
watchman watch-list | grep -q -F "p7519-fsmonitor"
105105
fi
106106
'
107107

0 commit comments

Comments
 (0)