Skip to content

Commit

Permalink
Fix watcher path in output
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrech committed Apr 5, 2024
1 parent 909b380 commit 041a4ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/Generated/WatchWithForcedTimeoutTest.php.err.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
In Process.php line XXXX:

The process "'.../src/Runner/../../tools/watcher/bin/watcher-linux-amd64' '.../tests/fixtures/valid/...'" exceeded the timeout of 1 seconds.
The process "'watcher' '.../tests/fixtures/valid/...'" exceeded the timeout of 1 seconds.


fs-watch
Expand Down
8 changes: 7 additions & 1 deletion tests/Helper/OutputCleaner.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ public static function cleanOutput(string $string): string
$string = ltrim($string, "\n"); // Trim output start to avoid empty lines
$string = preg_replace('/ +$/m', '', $string); // Remove trailing space

return str_replace(\dirname(__DIR__, 2), '...', $string);
$string = str_replace(\dirname(__DIR__, 2), '...', $string);

// Fix the watcher path when running the tests with local project VS in the phar / static
$string = str_replace('.../src/Runner/../../tools/watcher/bin/watcher-linux-amd64', 'watcher', $string);
$string = str_replace('/tmp/watcher-linux-amd64', 'watcher', $string);

return $string;
}
}

0 comments on commit 041a4ae

Please sign in to comment.