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
PHPUnit - BaseCommandParser.php does not read stderr causing TapParser to crash #444
Comments
I had the same problem. That happens because phpci tries to find phpunit in own root directory or in system (using which). To solve that problem you can reconstruct commandExecutor after build creation like:
at Builder.php:307 |
This doesn't solve my problem. PHPCI can find phpunit, it just doesn't run properly. |
Seems like there is another reason... |
OK, I figured it out. I was the problem (PHP newbie) myself: apparently test classes should have the same name as the file they are in. Whoops. test:
php_unit:
args: "--stderr" which will make PHPUnit write all its output to the standard error. This causes an error:
The output of PHPUnit will not be read by BaseCommandExecutor.php. This causes TapParser.php to crash (since it's not a valid TAP format). So I would suggest removing this from the wiki (or let BaseCommandExecutor read stderr 👍 ). |
Okay, we've made it so that PHPCI will properly log any errors generated by commands (like PHPUnit, PHPCS, etc) in addition to trying to parse the actual output. You shouldn't need to use the If this doesn't resolve the problems you've been seeing, please feel free to reopen this issue. |
I'm trying to get PHPUnit to work, but I just can't figure out how to configure PHPCI. Running PHPCI without phpci.yml works (successful build), however this does not run PHPUnit. To get PHPUnit to work, I created a very basic phpci.yml, like this:
I also tried:
But it just doesn't work, I keep getting:
Also tried updating PHPUnit to the latest version, no change. What am I doing wrong?
Running PHPUnit from the vendor/bin folder works fine (so I can't really blame PHPUnit).
PHPCI is able to find the binary, when I enable the logging the log file contains:
The text was updated successfully, but these errors were encountered: