forked from facebook/watchman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[watchman] add integration test for the trigger command
Summary: add a test for the "trigger" command, which is used to spawn a process and invoke it when files that match a pattern are observed to change. This builds on the debug connection from the prior diff to get its stuff done, and introduces a couple of nice helpers functions that reduce flaky results without too many arbitrary pauses. Test Plan: `arc unit`. Note that there is a race in basic.php that can trigger if we get multiple notifies about the file that we touch; these can cause the cursor to return an additional file at the point where we expect it to usually return none. Reviewers: keegancsmith, dsereni, zoel, pieter Reviewed By: zoel Differential Revision: https://phabricator.fb.com/D648760
- Loading branch information
Showing
8 changed files
with
236 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
# $1 = name of a log file | ||
# the rest of the args are names of files that were modified | ||
log="$1" | ||
shift | ||
|
||
date +%s >>$log | ||
while test -n "$1" ; do | ||
echo >>$log $1 | ||
shift | ||
done | ||
|
Oops, something went wrong.