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

Failing tests on OSX and Amazon Linux #8

Closed
moffe42 opened this issue Jan 23, 2015 · 7 comments
Closed

Failing tests on OSX and Amazon Linux #8

moffe42 opened this issue Jan 23, 2015 · 7 comments

Comments

@moffe42
Copy link

moffe42 commented Jan 23, 2015

I get the following failing test on OSX

Software  OS X 10.9.5 (13F34)

Test run by phpunit

PHPUnit 4.3.5 by Sebastian Bergmann.

.FF.............................FF............

Time: 8.53 seconds, Memory: 3.75Mb

There were 4 failures:

1) /private/tmp/uopz-2.0.6/tests/002.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-bool(true)
+bool(false)
 bool(true)

2) /private/tmp/uopz-2.0.6/tests/003.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-bool(true)
+bool(false)

3) /private/tmp/uopz-2.0.6/tests/034.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-object(test)#%d (%d) {
-}
-array(1) {
-  ["mine"]=>
-  string(4) "mine"
-}
+Fatal error: Class 'other' not found in - on line 9

4) /private/tmp/uopz-2.0.6/tests/035.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-object(test)#%d (%d) {
-  ["arg":protected]=>
-  object(stdClass)#%d (0) {
-  }
-}
-array(1) {
-  ["TestBundle"]=>
-  string(10) "TestBundle"
-}
+Fatal error: Class 'test' not found in - on line 26

FAILURES!
Tests: 46, Assertions: 46, Failures: 4.

php -v

PHP 5.5.20 (cli) (built: Jan  6 2015 12:30:39)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with uopz v2.0.6, Copyright (c) 2014, by Joe Watkins <krakjoe@php.net>
    with Xdebug v2.2.6, Copyright (c) 2002-2014, by Derick Rethans

And i get the same on Amazon Linux

NAME="Amazon Linux AMI"
VERSION="2014.09"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2014.09"
PRETTY_NAME="Amazon Linux AMI 2014.09"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2014.09:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"

Test run by phpunit

PHPUnit 4.4.2 by Sebastian Bergmann.

.FF.............................FF............

Time: 1.89 seconds, Memory: 3.75Mb

There were 4 failures:

1) /tmp/uopz-2.0.6/tests/002.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-bool(true)
+bool(false)
 bool(true)

2) /tmp/uopz-2.0.6/tests/003.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-bool(true)
+bool(false)

3) /tmp/uopz-2.0.6/tests/034.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-object(test)#%d (%d) {
-}
-array(1) {
-  ["mine"]=>
-  string(4) "mine"
-}
+Fatal error: Class 'other' not found in - on line 9

4) /tmp/uopz-2.0.6/tests/035.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-object(test)#%d (%d) {
-  ["arg":protected]=>
-  object(stdClass)#%d (0) {
-  }
-}
-array(1) {
-  ["TestBundle"]=>
-  string(10) "TestBundle"
-}
+Fatal error: Class 'test' not found in - on line 26

FAILURES!
Tests: 46, Assertions: 46, Failures: 4.

php -v

PHP 5.5.18 (cli) (built: Oct 27 2014 20:24:54)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with uopz v2.0.6, Copyright (c) 2014, by Joe Watkins <krakjoe@php.net>
    with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
NAME="Amazon Linux AMI"
VERSION="2014.09"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2014.09"
PRETTY_NAME="Amazon Linux AMI 2014.09"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2014.09:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
@krakjoe
Copy link
Owner

krakjoe commented Jan 26, 2015

Why are you running tests with phpunit ?

@moffe42
Copy link
Author

moffe42 commented Jan 27, 2015

Because this was what was handy at the moment...

@krakjoe
Copy link
Owner

krakjoe commented Jan 28, 2015

You don't run tests with phpunit, they aren't phpunit tests.

See https://github.com/krakjoe/uopz#testing

@krakjoe krakjoe closed this as completed Jan 28, 2015
@moffe42
Copy link
Author

moffe42 commented Jan 28, 2015

I'm not a extension dev, so not quite sure what that means, but same result with pecl

jach@jach:/tmp/uopz/tests$ pecl run-tests *
Running 46 tests
PASS [ 1/46] Test exit overload[001.phpt]
FAIL [ 2/46] Test new overload[002.phpt]
FAIL [ 3/46] Test add trait[003.phpt]
PASS [ 4/46] Test add interface[004.phpt]
PASS [ 5/46] Test instancoef[005.phpt]
PASS [ 6/46] Test throw[006.phpt]
PASS [ 7/46] Test rename[007.phpt]
PASS [ 8/46] Test redefine[008.phpt]
PASS [ 9/46] Test delete[010.phpt]
PASS [10/46] Test undefine/redefine[011.phpt]
PASS [11/46] Test implement[012.phpt]
PASS [12/46] Test extend[013.phpt]
PASS [13/46] Test compose[014.phpt]
PASS [14/46] Test override[015.phpt]
PASS [15/46] Test magic methods[016.phpt]
PASS [16/46] Test backup/restore[017.phpt]
PASS [17/46] Test backup/restore user functions[018.phpt]
PASS [18/46] Test auto restore user functions[019.phpt]
PASS [19/46] Test auto restore internals[020.phpt]
PASS [20/46] Test backup/restore user methods[021.phpt]
PASS [21/46] Test auto restore user methods[022.phpt]
PASS [22/46] Test backup/restore internal methods[023.phpt]
PASS [23/46] Test auto restore internal methods[024.phpt]
PASS [24/46] Test copy user functions[025.phpt]
PASS [25/46] Test backup/restore/rename combination[026.phpt]
PASS [26/46] Test use original function[027.phpt]
PASS [27/46] Test compose interface[028.phpt]
PASS [28/46] Test compose trait[029.phpt]
PASS [29/46] Test sane composition of normal classes[030.phpt]
PASS [30/46] Test sane composition of interfaces[031.phpt]
PASS [31/46] Test sane composition of traits[032.phpt]
PASS [32/46] Test sane use of traits and interfaces[033.phpt]
FAIL [33/46] Test fetch class overload[034.phpt]
FAIL [34/46] Test fetch class and compose[035.phpt]
PASS [35/46] Test modifiers on functions[036.phpt]
PASS [36/46] Test modifiers on functions are copied by default[037.phpt]
PASS [37/46] Test complicated construction of classes[038.phpt]
PASS [38/46] Test bug in finding functions[039.phpt]
PASS [39/46] Test bug in finding private user functions[040.phpt]
PASS [40/46] Test creation of properties when composing[041.phpt]
PASS [41/46] Test sensible extend operation[042.phpt]
PASS [42/46] Test compose error conditions (interface with properties)[043.phpt]
PASS [43/46] Test overload error conditions for bad handlers[044.phpt]
PASS [44/46] Test uopz_function with global function and modifiers[045.phpt]
PASS [45/46] Test uopz_delete cleans up magic[046.phpt]
PASS [46/46] Test uopz_flags operation[047.phpt]
wrote log to "/private/tmp/uopz/tests/run-tests.log"
TOTAL TIME: 00:09
42 PASSED TESTS
0 SKIPPED TESTS
4 FAILED TESTS:
002.phpt
003.phpt
034.phpt
035.phpt

@moffe42
Copy link
Author

moffe42 commented Jan 28, 2015

I guess this was what you where asking for

ach@jach:...4.14-20130505-195324/lib/build (master)$ TEST_PHP_EXECUTABLE=/usr/local/bin/php php run-tests.php /tmp/uopz/tests/

=====================================================================
PHP         : /usr/local/bin/php
PHP_SAPI    : cli
PHP_VERSION : 5.5.20
ZEND_VERSION: 2.5.0
PHP_OS      : Darwin - Darwin jach 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
INI actual  : /usr/local/etc/php/5.5/php.ini
More .INIs  : /usr/local/etc/php/5.5/conf.d/ext-mcrypt.ini,/usr/local/etc/php/5.5/conf.d/ext-memcached.ini,/usr/local/etc/php/5.5/conf.d/ext-xdebug.ini
CWD         : /usr/local/php5-5.4.14-20130505-195324/lib/build
Extra dirs  :
VALGRIND    : Not used
=====================================================================
Running selected tests.
PASS Test exit overload [/private/tmp/uopz/tests/001.phpt]
FAIL Test new overload [/private/tmp/uopz/tests/002.phpt]
FAIL Test add trait [/private/tmp/uopz/tests/003.phpt]
PASS Test add interface [/private/tmp/uopz/tests/004.phpt]
PASS Test instancoef [/private/tmp/uopz/tests/005.phpt]
PASS Test throw [/private/tmp/uopz/tests/006.phpt]
PASS Test rename [/private/tmp/uopz/tests/007.phpt]
PASS Test redefine [/private/tmp/uopz/tests/008.phpt]
PASS Test delete [/private/tmp/uopz/tests/010.phpt]
PASS Test undefine/redefine [/private/tmp/uopz/tests/011.phpt]
PASS Test implement [/private/tmp/uopz/tests/012.phpt]
PASS Test extend [/private/tmp/uopz/tests/013.phpt]
PASS Test compose [/private/tmp/uopz/tests/014.phpt]
PASS Test override [/private/tmp/uopz/tests/015.phpt]
PASS Test magic methods [/private/tmp/uopz/tests/016.phpt]
PASS Test backup/restore [/private/tmp/uopz/tests/017.phpt]
PASS Test backup/restore user functions [/private/tmp/uopz/tests/018.phpt]
PASS Test auto restore user functions [/private/tmp/uopz/tests/019.phpt]
PASS Test auto restore internals [/private/tmp/uopz/tests/020.phpt]
PASS Test backup/restore user methods [/private/tmp/uopz/tests/021.phpt]
PASS Test auto restore user methods [/private/tmp/uopz/tests/022.phpt]
PASS Test backup/restore internal methods [/private/tmp/uopz/tests/023.phpt]
PASS Test auto restore internal methods [/private/tmp/uopz/tests/024.phpt]
PASS Test copy user functions [/private/tmp/uopz/tests/025.phpt]
PASS Test backup/restore/rename combination [/private/tmp/uopz/tests/026.phpt]
PASS Test use original function [/private/tmp/uopz/tests/027.phpt]
PASS Test compose interface [/private/tmp/uopz/tests/028.phpt]
PASS Test compose trait [/private/tmp/uopz/tests/029.phpt]
PASS Test sane composition of normal classes [/private/tmp/uopz/tests/030.phpt]
PASS Test sane composition of interfaces [/private/tmp/uopz/tests/031.phpt]
PASS Test sane composition of traits [/private/tmp/uopz/tests/032.phpt]
PASS Test sane use of traits and interfaces [/private/tmp/uopz/tests/033.phpt]
FAIL Test fetch class overload [/private/tmp/uopz/tests/034.phpt]
FAIL Test fetch class and compose [/private/tmp/uopz/tests/035.phpt]
PASS Test modifiers on functions [/private/tmp/uopz/tests/036.phpt]
PASS Test modifiers on functions are copied by default [/private/tmp/uopz/tests/037.phpt]
PASS Test complicated construction of classes [/private/tmp/uopz/tests/038.phpt]
PASS Test bug in finding functions [/private/tmp/uopz/tests/039.phpt]
PASS Test bug in finding private user functions [/private/tmp/uopz/tests/040.phpt]
PASS Test creation of properties when composing [/private/tmp/uopz/tests/041.phpt]
PASS Test sensible extend operation [/private/tmp/uopz/tests/042.phpt]
PASS Test compose error conditions (interface with properties) [/private/tmp/uopz/tests/043.phpt]
PASS Test overload error conditions for bad handlers [/private/tmp/uopz/tests/044.phpt]
PASS Test uopz_function with global function and modifiers [/private/tmp/uopz/tests/045.phpt]
PASS Test uopz_delete cleans up magic [/private/tmp/uopz/tests/046.phpt]
PASS Test uopz_flags operation [/private/tmp/uopz/tests/047.phpt]
=====================================================================
Number of tests :   46                46
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    4 (  8.7%) (  8.7%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :   42 ( 91.3%) ( 91.3%)
---------------------------------------------------------------------
Time taken      :    9 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test new overload [/private/tmp/uopz/tests/002.phpt]
Test add trait [/private/tmp/uopz/tests/003.phpt]
Test fetch class overload [/private/tmp/uopz/tests/034.phpt]
Test fetch class and compose [/private/tmp/uopz/tests/035.phpt]
=====================================================================

@moffe42
Copy link
Author

moffe42 commented Jan 28, 2015

And the same test output from Amazon Linux

[root@hirohito build]# TEST_PHP_EXECUTABLE=/usr/bin/php php run-tests.php /tmp/uopz/tests/

=====================================================================
PHP         : /usr/bin/php
PHP_SAPI    : cli
PHP_VERSION : 5.5.18
ZEND_VERSION: 2.5.0
PHP_OS      : Linux - Linux hirohito.colourbox.com 3.14.19-17.43.amzn1.x86_64 #1 SMP Wed Sep 17 22:14:52 UTC 2014 x86_64
INI actual  : /etc/php-5.5.ini
More .INIs  : /etc/php-5.5.d/bz2.ini,/etc/php-5.5.d/calendar.ini,/etc/php-5.5.d/ctype.ini,/etc/php-5.5.d/curl.ini,/etc/php-5.5.d/dom.ini,/etc/php-5.5.d/exif.ini,/etc/php-5.5.d/fileinfo.ini,/etc/php-5.5.d/ftp.ini,/etc/php-5.5.d/gettext.ini,/etc/php-5.5.d/iconv.ini,/etc/php-5.5.d/intl.ini,/etc/php-5.5.d/json.ini,/etc/php-5.5.d/mbstring.ini,/etc/php-5.5.d/mcrypt.ini,/etc/php-5.5.d/memcached.ini,/etc/php-5.5.d/mysqlnd.ini,/etc/php-5.5.d/mysqlnd_mysql.ini,/etc/php-5.5.d/mysqlnd_mysqli.ini,/etc/php-5.5.d/pdo.ini,/etc/php-5.5.d/pdo_mysqlnd.ini,/etc/php-5.5.d/pdo_sqlite.ini,/etc/php-5.5.d/phar.ini,/etc/php-5.5.d/php.ini,/etc/php-5.5.d/posix.ini,/etc/php-5.5.d/shmop.ini,/etc/php-5.5.d/simplexml.ini,/etc/php-5.5.d/soap.ini,/etc/php-5.5.d/sockets.ini,/etc/php-5.5.d/sqlite3.ini,/etc/php-5.5.d/stem.ini,/etc/php-5.5.d/sysvmsg.ini,/etc/php-5.5.d/sysvsem.ini,/etc/php-5.5.d/sysvshm.ini,/etc/php-5.5.d/tokenizer.ini,/etc/php-5.5.d/uopz.ini,/etc/php-5.5.d/xdebug.ini,/etc/php-5.5.d/xml.ini,/etc/php-5.5.d/xml_wddx.ini,/etc/php-5.5.d/xmlreader.ini,/etc/php-5.5.d/xmlwriter.ini,/etc/php-5.5.d/xsl.ini,/etc/php-5.5.d/zip.ini
CWD         : /usr/lib64/php/5.5/build
Extra dirs  :
VALGRIND    : Not used
=====================================================================
Running selected tests.
PASS Test exit overload [/tmp/uopz/tests/001.phpt]
FAIL Test new overload [/tmp/uopz/tests/002.phpt]
FAIL Test add trait [/tmp/uopz/tests/003.phpt]
PASS Test add interface [/tmp/uopz/tests/004.phpt]
PASS Test instancoef [/tmp/uopz/tests/005.phpt]
PASS Test throw [/tmp/uopz/tests/006.phpt]
PASS Test rename [/tmp/uopz/tests/007.phpt]
PASS Test redefine [/tmp/uopz/tests/008.phpt]
PASS Test delete [/tmp/uopz/tests/010.phpt]
PASS Test undefine/redefine [/tmp/uopz/tests/011.phpt]
PASS Test implement [/tmp/uopz/tests/012.phpt]
PASS Test extend [/tmp/uopz/tests/013.phpt]
PASS Test compose [/tmp/uopz/tests/014.phpt]
PASS Test override [/tmp/uopz/tests/015.phpt]
PASS Test magic methods [/tmp/uopz/tests/016.phpt]
PASS Test backup/restore [/tmp/uopz/tests/017.phpt]
PASS Test backup/restore user functions [/tmp/uopz/tests/018.phpt]
PASS Test auto restore user functions [/tmp/uopz/tests/019.phpt]
PASS Test auto restore internals [/tmp/uopz/tests/020.phpt]
PASS Test backup/restore user methods [/tmp/uopz/tests/021.phpt]
PASS Test auto restore user methods [/tmp/uopz/tests/022.phpt]
PASS Test backup/restore internal methods [/tmp/uopz/tests/023.phpt]
PASS Test auto restore internal methods [/tmp/uopz/tests/024.phpt]
PASS Test copy user functions [/tmp/uopz/tests/025.phpt]
PASS Test backup/restore/rename combination [/tmp/uopz/tests/026.phpt]
PASS Test use original function [/tmp/uopz/tests/027.phpt]
PASS Test compose interface [/tmp/uopz/tests/028.phpt]
PASS Test compose trait [/tmp/uopz/tests/029.phpt]
PASS Test sane composition of normal classes [/tmp/uopz/tests/030.phpt]
PASS Test sane composition of interfaces [/tmp/uopz/tests/031.phpt]
PASS Test sane composition of traits [/tmp/uopz/tests/032.phpt]
PASS Test sane use of traits and interfaces [/tmp/uopz/tests/033.phpt]
FAIL Test fetch class overload [/tmp/uopz/tests/034.phpt]
FAIL Test fetch class and compose [/tmp/uopz/tests/035.phpt]
PASS Test modifiers on functions [/tmp/uopz/tests/036.phpt]
PASS Test modifiers on functions are copied by default [/tmp/uopz/tests/037.phpt]
PASS Test complicated construction of classes [/tmp/uopz/tests/038.phpt]
PASS Test bug in finding functions [/tmp/uopz/tests/039.phpt]
PASS Test bug in finding private user functions [/tmp/uopz/tests/040.phpt]
PASS Test creation of properties when composing [/tmp/uopz/tests/041.phpt]
PASS Test sensible extend operation [/tmp/uopz/tests/042.phpt]
PASS Test compose error conditions (interface with properties) [/tmp/uopz/tests/043.phpt]
PASS Test overload error conditions for bad handlers [/tmp/uopz/tests/044.phpt]
PASS Test uopz_function with global function and modifiers [/tmp/uopz/tests/045.phpt]
PASS Test uopz_delete cleans up magic [/tmp/uopz/tests/046.phpt]
PASS Test uopz_flags operation [/tmp/uopz/tests/047.phpt]
=====================================================================
Number of tests :   46                46
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    4 (  8.7%) (  8.7%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :   42 ( 91.3%) ( 91.3%)
---------------------------------------------------------------------
Time taken      :    1 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test new overload [/tmp/uopz/tests/002.phpt]
Test add trait [/tmp/uopz/tests/003.phpt]
Test fetch class overload [/tmp/uopz/tests/034.phpt]
Test fetch class and compose [/tmp/uopz/tests/035.phpt]
=====================================================================

@krakjoe
Copy link
Owner

krakjoe commented Jan 28, 2015

Those tests are failing because uopz isn't loaded as a zend_extension, but as an extension, see the readme for how to load uopz.

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

2 participants