Closed evert closed 10 years ago
Thanks for reporting this. I suspect it has something to do with not supporting a particular commandline option. Feel free to submit a PR if you (or someone else reading this) gets to this before we do.
@evert The correct place for claim a issue about the product is the product itself. Follow this issue https://github.com/sebastianbergmann/phpunit/issues/1090
@Maks3w that's only really correct if it's determined here if this is not to be fixed. hhvm aims for compatibility afaik.
@scannell This is due to the fact that HHVM does not run code from STDIN:
➜ ~ php < test.php
foo
➜ ~ hhvm < test.php
HipHop Notice: Nothing to do. Either pass a .php file to run, or use -m server
I have opened issue #1590 to track this incompatibility.
We have the exact same problem with atoum where, to run test in isolated processes, we write code on STDIN. HHVM does not support that.
I actually made a workaround by writing code to a temporary file so I can pass its path to hhvm : https://github.com/jubianchi/atoum/commit/2c4bf9879c2ed54f46ac2f98f079d2ecbad2c497
It works but it could lead to performance loss : each test method being executed in its own process, for a suite like the atoum's one, we have to write something like 1600 temporary files.
@sebastianbergmann that makes sense, thanks for figuring out the root cause. I'll leave this open for the moment -- when this gets fixed it should close both issues though.
Running hhvm as 'php' (eg via a symlink) also works with the master version of PHPUnit.
You're also blocked by ini_get_all(), and get_included_files() being returned in the right order. These are both being worked on.
This can be tested with the following script:
Just run
hhvm phpunit ProcessIsolationTest.php
to trigger the error.Effect on hhvm:
Effect on vanilla php: