-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Finder] Adds bsd adapter. #5876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Here are the results for the Finder tests on my Mac:
|
@fabpot thank you! It seems I need to experiment a little more... |
This PR was merged into the master branch. Commits ------- 2401274 [Finder] Added bsd adapter (need tests). Discussion ---------- [WIP] [Finder] Adds bsd adapter (need tests). **I have no mac or bsd system. Could someone please tell me if test pass?** I used this solution to replace `-printf` option: `find . -print0 | xargs -0 stat -f '%i '` (http://stackoverflow.com/questions/752818/why-does-macs-find-not-have-the-option-printf). Too bad Github didn't handle the file move :( The only difference between the two `find` implementation is: * GNU: https://github.com/jfsimon/symfony/pull/new/bsd_find#L2R48 * BSD: https://github.com/jfsimon/symfony/pull/new/bsd_find#L1R46
->ins('find') | ||
->add('find ') | ||
->arg($dir) | ||
->add('-noleaf') // -noleaf option is required for filesystems who doesn't follow '.' and '..' convention |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. :)
@fabpot BSD adapter is OK on mac os x. |
This PR was merged into the master branch. Commits ------- b550677 [Finder] Fix the BSD adapter 2401274 [Finder] Added bsd adapter (need tests). Discussion ---------- [Finder] Adds bsd adapter. OK on mac os x. --------------------------------------------------------------------------- by fabpot at 2012-10-31T08:22:05Z Here are the results for the Finder tests on my Mac: ``` ............................................................... 63 / 181 ( 34%) ......................find: -regextype: unknown primary or operator F..............find: -regextype: unknown primary or operator find: -regextype: unknown primary or operator .find: -regextype: unknown primary or operator find: -regextype: unknown primary or operator ......................... 126 / 181 ( 69%) ....................................................... Time: 1 second, Memory: 10.75Mb There was 1 failure: 1) Symfony\Component\Finder\Tests\FinderTest::testIgnoreDotFiles with data set #1 (Symfony\Component\Finder\Adapter\PhpAdapter) Failed asserting that two arrays are equal. --- Expected +++ Actual @@ @@ Array ( - 0 => '/var/folders/h7/55h7wcsx4g1cl...r/.bar' - 1 => '/var/folders/h7/55h7wcsx4g1cl...r/.foo' - 2 => '/var/folders/h7/55h7wcsx4g1cl...o/.bar' - 3 => '/var/folders/h7/55h7wcsx4g1cl...r/.git' - 4 => '/var/folders/h7/55h7wcsx4g1cl...er/foo' - 5 => '/var/folders/h7/55h7wcsx4g1cl...oo bar' - 6 => '/var/folders/h7/55h7wcsx4g1cl...ar.tmp' - 7 => '/var/folders/h7/55h7wcsx4g1cl...st.php' - 8 => '/var/folders/h7/55h7wcsx4g1cl...est.py' - 9 => '/var/folders/h7/55h7wcsx4g1cl...r/toto' ) .../src/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php:25 .../src/Symfony/Component/Finder/Tests/FinderTest.php:207 phpunit:46 ``` --------------------------------------------------------------------------- by jfsimon at 2012-10-31T08:46:22Z @fabpot thank you! It seems I need to experiment a little more... --------------------------------------------------------------------------- by jfsimon at 2012-11-01T14:38:31Z @fabpot BSD adapter is OK on mac os x.
OK on mac os x.