Skip to content
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

Atoum tests blocked on windows #49

Closed
syrm opened this issue Jan 25, 2012 · 10 comments
Closed

Atoum tests blocked on windows #49

syrm opened this issue Jan 25, 2012 · 10 comments

Comments

@syrm
Copy link
Contributor

syrm commented Jan 25, 2012

php mageekguy.atoum.phar --testIt

atoum version nightly-962-201201232248 by Fr├®d├®ric Hardy (phar://c:/xxxxxxxxxxxxxx/vendor/mageekguy.atoum.phar/1)
PHP path: c:\UwAmp\bin\php\php-5.3.5\php.exe
PHP version:
=> PHP 5.3.5 (cli) (built: Jan 6 2011 17:54:09)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
mageekguy\atoum\tests\units\adapter...
[.][0/1]
[S
][1/1]
=> Test duration: 0.03 second.
=> Memory usage: 0.25 Mb.
mageekguy\atoum\tests\units\annotations\extractor...
[......][0/6]
[S.....
][1/6]
[SS....][2/6]
[SSS...
][3/6]
[SSSS..][4/6]
[SSSSS.
][5/6]
[SSSSSS______________________________________________________][6/6]
=> Test duration: 0.31 second.
=> Memory usage: 1.75 Mb.
mageekguy\atoum\tests\units\asserter\generator...
[.........___________________________________________________][0/9]^C

@mageekguy
Copy link
Contributor

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 :/.

@syrm
Copy link
Contributor Author

syrm commented Jan 25, 2012

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.

@mageekguy
Copy link
Contributor

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".

@tharkun
Copy link
Contributor

tharkun commented Feb 2, 2012

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.

@mageekguy
Copy link
Contributor

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

@tharkun
Copy link
Contributor

tharkun commented Feb 3, 2012

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.

@mageekguy
Copy link
Contributor

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

@syrm
Copy link
Contributor Author

syrm commented Apr 24, 2012

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}

@mageekguy
Copy link
Contributor

And if you don't use the PHAR ?

@syrm
Copy link
Contributor Author

syrm commented Apr 24, 2012

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}

@mageekguy mageekguy mentioned this issue Jun 12, 2012
mageekguy added a commit that referenced this issue Jun 15, 2012
mageekguy added a commit that referenced this issue Jun 15, 2012
mageekguy added a commit that referenced this issue Jun 15, 2012
mageekguy added a commit that referenced this issue Jun 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants