Giter VIP home page Giter VIP logo

Comments (10)

mageekguy avatar mageekguy commented on May 13, 2024

It's a PHP bug on Windows which depend of PHP version and Windows version.
PHP hang when it's trying to read the error stream.
Currently, i have no solution :/.

from atoum.

syrm avatar syrm commented on May 13, 2024

So right now Atoum can't be used on windows ?
Could you give me the piece of code for reading the error stream.

I can try to help you.

from atoum.

mageekguy avatar mageekguy commented on May 13, 2024

You can use it, not test itself because some unit tests are UNIX dependant.
You can read classes/test.php and search stream_get_contents() function to find the "problem".

from atoum.

tharkun avatar tharkun commented on May 13, 2024

In classes/test.php, there is a piece of code which use stream_get_contents to read stdout and stderr.

You only need to read the one which is in second place first.

from atoum.

mageekguy avatar mageekguy commented on May 13, 2024

I'm not sure that this solution works for all Windows version.

from atoum.

tharkun avatar tharkun commented on May 13, 2024

You're right. I had trouble with that solution but it allows me to find why the test did not run at that time.

For now, i did not find any solution too.

from atoum.

mageekguy avatar mageekguy commented on May 13, 2024

Can you try the "engine" branch (https://github.com/mageekguy/atoum/tree/engine), please ?

from atoum.

syrm avatar syrm commented on May 13, 2024

First thing, don't forget to said in documentation to set PHPBIN to php executable on Windows.
Second thing : everything is ok with the "engine" branch, except some failure :

=> mageekguy\atoum\tests\units\autoloader::testGetDirectories():
In file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/autoloader.php on line 19, mageekguy\atoum\test\asserter\generator() failed: array(1) is not equal to array(1)
-Reference
+Data
@@ -1 +1 @@
-array(1) {
[0]=>
string(99) "phar://c:/secret/vendor/mageekguy.atoum.phar/1\classes"
}
+array(1) {
[0]=>
string(99) "phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes"
}
=> mageekguy\atoum\tests\units\report\fields\runner\coverage\html::testCleanDestinationDirectory():
In file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/report/fields/runner/coverage/html.php on line 233, mageekguy\atoum\test\asserter\generator() failed: function unlink(string(49) "atoum://destinationDirectory/aDirectory/firstFile") is called 0 time instead of 1
=> mageekguy\atoum\tests\units\report\fields\runner\tests\uncompleted\cli::test__toString():
In file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/report/fields/runner/tests/uncompleted/cli.php on line 245, mageekguy\atoum\test\asserter\generator() failed: strings are not equals
-Reference
+Data
@@ -5 +5 @@
-output(27) "4f969e0f684b1
+output(28) "4f969e0f684b1
=> mageekguy\atoum\tests\units\scripts\phar\generator::testSetOriginDirectory():
In file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/scripts/phar/generator.php on line 92, mageekguy\atoum\test\asserter\generator() failed: strings are not equals
-Reference
+Data
@@ -1 +1 @@
-string(13) "4f969e3cecf47"
+string(14) "4f969e3cecf47/"
=> mageekguy\atoum\tests\units\scripts\phar\generator::testSetDestinationDirectory():
In file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/scripts/phar/generator.php on line 141, mageekguy\atoum\test\asserter\generator() failed: strings are not equals
-Reference
+Data
@@ -1 +1 @@
-string(13) "4f969e3d2e2a1"
+string(14) "4f969e3d2e2a1/"

There are 3 exceptions:
=> mageekguy\atoum\tests\units\iterators\recursives\atoum\source::testCurrent():
==> Exception throwed in file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/iterators/recursives/atoum/iterator.php on line 59:
==> exception 'mageekguy\atoum\exceptions\logic' with message 'Stream 'atoum://sourceDirectory\file' is undefined' in phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/mock/stream.php:42
Stack trace:
#0 [internal function]: mageekguy\atoum\mock\stream->__call('url_stat', Array)
#1 [internal function]: mageekguy\atoum\mock\stream->url_stat('atoum://sourceD...', 3)
#2 [internal function]: RecursiveDirectoryIterator->hasChildren()
#3 [internal function]: RecursiveFilterIterator->hasChildren()
#4 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/iterators/recursives/atoum/source.php(22): RecursiveIteratorIterator->rewind()
#5 phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/iterators/recursives/atoum/iterator.php(59): mageekguy\atoum\iterators\recursives\atoum\source->__construct('atoum://sourceD...')
#6 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/test.php(592): mageekguy\atoum\tests\units\iterators\recursives\atoum\source->testCurrent()
#7 -(1): mageekguy\atoum\test->runTestMethod('testCurrent')
#8 {main}
=> mageekguy\atoum\tests\units\iterators\recursives\atoum\source::testKey():
==> Exception throwed in file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/iterators/recursives/atoum/iterator.php on line 87:
==> exception 'mageekguy\atoum\exceptions\logic' with message 'Stream 'atoum://sourceDirectory\file' is undefined' in phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/mock/stream.php:42
Stack trace:
#0 [internal function]: mageekguy\atoum\mock\stream->__call('url_stat', Array)
#1 [internal function]: mageekguy\atoum\mock\stream->url_stat('atoum://sourceD...', 3)
#2 [internal function]: RecursiveDirectoryIterator->hasChildren()
#3 [internal function]: RecursiveFilterIterator->hasChildren()
#4 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/iterators/recursives/atoum/source.php(22): RecursiveIteratorIterator->rewind()
#5 phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/iterators/recursives/atoum/iterator.php(87): mageekguy\atoum\iterators\recursives\atoum\source->__construct('atoum://sourceD...')
#6 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/test.php(592): mageekguy\atoum\tests\units\iterators\recursives\atoum\source->testKey()
#7 -(1): mageekguy\atoum\test->runTestMethod('testKey')
#8 {main}
=> mageekguy\atoum\tests\units\scripts\builder\vcs\svn::testCleanWorkingDirectory():
==> Exception throwed in file phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/scripts/builder/vcs/svn.php on line 383:
==> exception 'mageekguy\atoum\exceptions\logic' with message 'Stream 'atoum://workingDirectory\aDirectory' is undefined' in phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/mock/stream.php:42
Stack trace:
#0 [internal function]: mageekguy\atoum\mock\stream->__call('url_stat', Array)
#1 [internal function]: mageekguy\atoum\mock\stream->url_stat('atoum://working...', 3)
#2 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/scripts/builder/vcs.php(112): RecursiveDirectoryIterator->hasChildren()
#3 [internal function]: mageekguy\atoum\scripts\builder\vcs->cleanWorkingDirectory()
#4 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/mock/generator.php(161) : eval()'d code(257): call_user_func_array('parent::cleanWo...', Array)
#5 phar://c:/secret/vendor/mageekguy.atoum.phar/1/tests/units/classes/scripts/builder/vcs/svn.php(383): mock\mageekguy\atoum\scripts\builder\vcs\svn->cleanWorkingDirectory()
#6 phar://c:/secret/vendor/mageekguy.atoum.phar/1/classes/test.php(592): mageekguy\atoum\tests\units\scripts\builder\vcs\svn->testCleanWorkingDirectory()
#7 -(1): mageekguy\atoum\test->runTestMethod('testCleanWorkin...')
#8 {main}

from atoum.

mageekguy avatar mageekguy commented on May 13, 2024

And if you don't use the PHAR ?

from atoum.

syrm avatar syrm commented on May 13, 2024

Other fail :

There are 3 exceptions:
=> mageekguy\atoum\tests\units\iterators\recursives\atoum\source::testCurrent():
==> Exception throwed in file c:\secret\vendor\atoum\tests\units\classes\iterators\recursives\atoum\iterator.php on line 59:
==> exception 'mageekguy\atoum\exceptions\logic' with message 'Stream 'atoum://sourceDirectory\file' is undefined' in c:\secret\vendor\atoum\classes\mock\stream.php:42
Stack trace:
#0 [internal function]: mageekguy\atoum\mock\stream->__call('url_stat', Array)
#1 [internal function]: mageekguy\atoum\mock\stream->url_stat('atoum://sourceD...', 3)
#2 [internal function]: RecursiveDirectoryIterator->hasChildren()
#3 [internal function]: RecursiveFilterIterator->hasChildren()
#4 c:\secret\vendor\atoum\classes\iterators\recursives\atoum\source.php(22): RecursiveIteratorIterator->rewind()
#5 c:\secret\vendor\atoum\tests\units\classes\iterators\recursives\atoum\iterator.php(59): mageekguy\atoum\iterators\recursives\atoum\source->__construct('atoum://sourceD...')
#6 c:\secret\vendor\atoum\classes\test.php(606): mageekguy\atoum\tests\units\iterators\recursives\atoum\source->testCurrent()
#7 -(1): mageekguy\atoum\test->runTestMethod('testCurrent')
#8 {main}
=> mageekguy\atoum\tests\units\iterators\recursives\atoum\source::testKey():
==> Exception throwed in file c:\secret\vendor\atoum\tests\units\classes\iterators\recursives\atoum\iterator.php on line 87:
==> exception 'mageekguy\atoum\exceptions\logic' with message 'Stream 'atoum://sourceDirectory\file' is undefined' in c:\secret\vendor\atoum\classes\mock\stream.php:42
Stack trace:
#0 [internal function]: mageekguy\atoum\mock\stream->__call('url_stat', Array)
#1 [internal function]: mageekguy\atoum\mock\stream->url_stat('atoum://sourceD...', 3)
#2 [internal function]: RecursiveDirectoryIterator->hasChildren()
#3 [internal function]: RecursiveFilterIterator->hasChildren()
#4 c:\secret\vendor\atoum\classes\iterators\recursives\atoum\source.php(22): RecursiveIteratorIterator->rewind()
#5 c:\secret\vendor\atoum\tests\units\classes\iterators\recursives\atoum\iterator.php(87): mageekguy\atoum\iterators\recursives\atoum\source->__construct('atoum://sourceD...')
#6 c:\secret\vendor\atoum\classes\test.php(606): mageekguy\atoum\tests\units\iterators\recursives\atoum\source->testKey()
#7 -(1): mageekguy\atoum\test->runTestMethod('testKey')
#8 {main}
=> mageekguy\atoum\tests\units\scripts\builder\vcs\svn::testCleanWorkingDirectory():
==> Exception throwed in file c:\secret\vendor\atoum\tests\units\classes\scripts\builder\vcs\svn.php on line 383:
==> exception 'mageekguy\atoum\exceptions\logic' with message 'Stream 'atoum://workingDirectory\aDirectory' is undefined' in c:\secret\vendor\atoum\classes\mock\stream.php:42
Stack trace:
#0 [internal function]: mageekguy\atoum\mock\stream->__call('url_stat', Array)
#1 [internal function]: mageekguy\atoum\mock\stream->url_stat('atoum://working...', 3)
#2 c:\secret\vendor\atoum\classes\scripts\builder\vcs.php(112): RecursiveDirectoryIterator->hasChildren()
#3 [internal function]: mageekguy\atoum\scripts\builder\vcs->cleanWorkingDirectory()
#4 c:\secret\vendor\atoum\classes\mock\generator.php(161) : eval()'d code(257): call_user_func_array('parent::cleanWo...', Array)
#5 c:\secret\vendor\atoum\tests\units\classes\scripts\builder\vcs\svn.php(383): mock\mageekguy\atoum\scripts\builder\vcs\svn->cleanWorkingDirectory()
#6 c:\secret\vendor\atoum\classes\test.php(606): mageekguy\atoum\tests\units\scripts\builder\vcs\svn->testCleanWorkingDirectory()
#7 -(1): mageekguy\atoum\test->runTestMethod('testCleanWorkin...')
#8 {main}

from atoum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.