Menu

#129 continuous integration

v1.0 (example)
closed-invalid
nobody
5
2008-12-20
2008-02-01
No

Consider a svn pre-commit hook to run php -l **/*.php before releasing code.
simpletest_1.0.1beta2 has a compile error.

Discussion

  • Marcus Baker

    Marcus Baker - 2008-02-02

    Logged In: YES
    user_id=695819
    Originator: NO

    Hi...

    Can you send us the error? Also, which version of PHP are you using and were you using the command line or web environment?

    We've had several thousand downloads of this tarball, so your comment is something of a surprise.

    yours, Marcus

     
  • Nobody/Anonymous

    Logged In: NO

    Thanks for the quick reply.
    SimpleTest is a promising product; I hope this helps,
    Bruce
    This also happens with the latest in svn.
    I am running, AFAICT, a standard Fedora 8 environment (but added simpletest to include path via php.ini. Same problem, even with original php.ini)
    php --version
    PHP 5.2.4 (cli) (built: Oct 16 2007 09:13:35)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with eAccelerator v0.9.5.1, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
    with Xdebug v2.0.2, Copyright (c) 2002-2007, by Derick Rethans

    for i in **/*.php;do php -l $i;done
    ...
    PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in test/eclipse_test.php on line 28
    No syntax errors detected in test/eclipse_test.php
    ...
    PHP Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in test/test_with_parse_error.php on line 5
    Errors parsing test/test_with_parse_error.php
    ...

    Also, with /usr/share/pear/simpletest/ in my PHP.ini include path, I ran the less convincing
    for i in **/*.php;do php -f $i|grep 'error';done

    PHP Fatal error: Class 'SimpleReporter' not found in /home/archive/simpletest/extensions/testdox.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/extensions/testdox.php:0
    ...
    E_NOTICE: Undefined index: tearDown in /home/archive/simpletest/test/exceptions_test.php on line 108
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /home/archive/simpletest/mock_objects.php(1007) : eval()'d code on line 83
    E_USER_ERROR: Cannot set expected arguments as $args parameter is not an array in /home/archive/simpletest/mock_objects.php on line 452
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /home/archive/simpletest/mock_objects.php(1030) : eval()'d code on line 75
    E_WARNING: Missing argument 1 for MockDummyInterface::anotherMethod(), called in /home/archive/simpletest/test/interfaces_test.php on line 30 and defined in /home/archive/simpletest/mock_objects.php(1004) : eval()'d code on line 10
    1) Bad TestSuite [/home/archive/simpletest/test/support/empty_test_file.php] with error [No runnable test cases in [/home/archive/simpletest/test/support/empty_test_file.php]]
    PHP Warning: require_once(../detached.php): failed to open stream: No such file or directory in /home/archive/simpletest/test/detached_test.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/detached_test.php:0
    PHP Fatal error: require_once(): Failed opening required '../detached.php' (include_path='.:/home/bingalls/Zend/workspaces/DefaultWorkspace/checkout/Website:/usr/share/pear:/usr/share/php') in /home/archive/simpletest/test/detached_test.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/detached_test.php:0
    PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/archive/simpletest/test/eclipse_test.php on line 28
    ...
    E_NOTICE: Undefined index: tearDown in /home/archive/simpletest/test/exceptions_test.php on line 108
    E_WARNING: Missing argument 1 for MockDummyInterface::anotherMethod(), called in /home/archive/simpletest/test/interfaces_test.php on line 30 and defined in /home/archive/simpletest/mock_objects.php(1004) : eval()'d code on line 10
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /home/archive/simpletest/mock_objects.php(1007) : eval()'d code on line 83
    E_USER_ERROR: Cannot set expected arguments as $args parameter is not an array in /home/archive/simpletest/mock_objects.php on line 452
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /home/archive/simpletest/mock_objects.php(1030) : eval()'d code on line 75
    PHP Warning: require_once(../unit_tester.php): failed to open stream: No such file or directory in /home/archive/simpletest/test/parse_error_test.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/parse_error_test.php:0
    PHP Fatal error: require_once(): Failed opening required '../unit_tester.php' (include_path='.:/home/bingalls/Zend/workspaces/DefaultWorkspace/checkout/Website:/usr/share/pear:/usr/share/php') in /home/archive/simpletest/test/parse_error_test.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/parse_error_test.php:0
    PHP Warning: require_once(../remote.php): failed to open stream: No such file or directory in /home/archive/simpletest/test/remote_test.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/remote_test.php:0
    PHP Fatal error: require_once(): Failed opening required '../remote.php' (include_path='.:/home/bingalls/Zend/workspaces/DefaultWorkspace/checkout/Website:/usr/share/pear:/usr/share/php') in /home/archive/simpletest/test/remote_test.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/remote_test.php:0
    PHP Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /home/archive/simpletest/test/test_with_parse_error.php on line 5
    ...
    E_NOTICE: Undefined index: tearDown in /home/archive/simpletest/test/exceptions_test.php on line 108
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /home/archive/simpletest/mock_objects.php(1007) : eval()'d code on line 83
    E_USER_ERROR: Cannot set expected arguments as $args parameter is not an array in /home/archive/simpletest/mock_objects.php on line 452
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /home/archive/simpletest/mock_objects.php(1030) : eval()'d code on line 75
    E_WARNING: Missing argument 1 for MockDummyInterface::anotherMethod(), called in /home/archive/simpletest/test/interfaces_test.php on line 30 and defined in /home/archive/simpletest/mock_objects.php(1004) : eval()'d code on line 10
    PHP Warning: require_once(../unit_tester.php): failed to open stream: No such file or directory in /home/archive/simpletest/test/visual_test.php on line 14
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/visual_test.php:0
    PHP Fatal error: require_once(): Failed opening required '../unit_tester.php' (include_path='.:/home/bingalls/Zend/workspaces/DefaultWorkspace/checkout/Website:/usr/share/pear:/usr/share/php') in /home/archive/simpletest/test/visual_test.php on line 14
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/visual_test.php:0

    As well as
    for i in **/*.php;do php -f $i|grep 'arning';done #As in "Warning"

    PHP Fatal error: Class 'SimpleReporter' not found in /home/archive/simpletest/extensions/testdox.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/extensions/testdox.php:0
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 120
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 131
    E_USER_NOTICE: a in /home/archive/simpletest/test/errors_test.php on line 137
    E_USER_NOTICE: b in /home/archive/simpletest/test/errors_test.php on line 138
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 143
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 148
    E_USER_NOTICE: % in /home/archive/simpletest/test/errors_test.php on line 153
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 170
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 176
    E_USER_WARNING: Ouch! in /home/archive/simpletest/test/errors_test.php on line 182
    E_USER_ERROR: Ouch! in /home/archive/simpletest/test/errors_test.php on line 188
    E_USER_NOTICE: % in /home/archive/simpletest/test/errors_test.php on line 213
    E_RECOVERABLE_ERROR: Argument 1 passed to RecoverableErrorTestingStub::ouch() must be an instance of RecoverableErrorTestingStub, instance of stdClass given, called in /home/archive/simpletest/test/errors_test.php on line 235 and defined in /home/archive/simpletest/test/errors_test.php(231) : eval()'d code on line 3
    E_USER_NOTICE: Error 1 in /home/archive/simpletest/test/errors_test.php on line 282
    E_USER_NOTICE: Error 2 in /home/archive/simpletest/test/errors_test.php on line 283
    E_USER_NOTICE: Error 1 in /home/archive/simpletest/test/errors_test.php on line 267
    E_NOTICE: Undefined index: tearDown in /home/archive/simpletest/test/exceptions_test.php on line 108
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /home/archive/simpletest/mock_objects.php(1007) : eval()'d code on line 83
    E_USER_ERROR: Cannot set expected arguments as $args parameter is not an array in /home/archive/simpletest/mock_objects.php on line 452
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /home/archive/simpletest/mock_objects.php(1030) : eval()'d code on line 75
    E_WARNING: Missing argument 1 for MockDummyInterface::anotherMethod(), called in /home/archive/simpletest/test/interfaces_test.php on line 30 and defined in /home/archive/simpletest/mock_objects.php(1004) : eval()'d code on line 10
    PHP Warning: require_once(../detached.php): failed to open stream: No such file or directory in /home/archive/simpletest/test/detached_test.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/detached_test.php:0
    PHP Fatal error: require_once(): Failed opening required '../detached.php' (include_path='.:/home/bingalls/Zend/workspaces/DefaultWorkspace/checkout/Website:/usr/share/pear:/usr/share/php') in /home/archive/simpletest/test/detached_test.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/detached_test.php:0
    PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/archive/simpletest/test/eclipse_test.php on line 28
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 120
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 131
    E_USER_NOTICE: a in /home/archive/simpletest/test/errors_test.php on line 137
    E_USER_NOTICE: b in /home/archive/simpletest/test/errors_test.php on line 138
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 143
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 148
    E_USER_NOTICE: % in /home/archive/simpletest/test/errors_test.php on line 153
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 170
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 176
    E_USER_WARNING: Ouch! in /home/archive/simpletest/test/errors_test.php on line 182
    E_USER_ERROR: Ouch! in /home/archive/simpletest/test/errors_test.php on line 188
    E_USER_NOTICE: % in /home/archive/simpletest/test/errors_test.php on line 213
    E_RECOVERABLE_ERROR: Argument 1 passed to RecoverableErrorTestingStub::ouch() must be an instance of RecoverableErrorTestingStub, instance of stdClass given, called in /home/archive/simpletest/test/errors_test.php on line 235 and defined in /home/archive/simpletest/test/errors_test.php(231) : eval()'d code on line 3
    E_USER_NOTICE: Error 1 in /home/archive/simpletest/test/errors_test.php on line 282
    E_USER_NOTICE: Error 2 in /home/archive/simpletest/test/errors_test.php on line 283
    E_USER_NOTICE: Error 1 in /home/archive/simpletest/test/errors_test.php on line 267
    E_NOTICE: Undefined index: tearDown in /home/archive/simpletest/test/exceptions_test.php on line 108
    E_WARNING: Missing argument 1 for MockDummyInterface::anotherMethod(), called in /home/archive/simpletest/test/interfaces_test.php on line 30 and defined in /home/archive/simpletest/mock_objects.php(1004) : eval()'d code on line 10
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /home/archive/simpletest/mock_objects.php(1007) : eval()'d code on line 83
    E_USER_ERROR: Cannot set expected arguments as $args parameter is not an array in /home/archive/simpletest/mock_objects.php on line 452
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /home/archive/simpletest/mock_objects.php(1030) : eval()'d code on line 75
    PHP Warning: require_once(../unit_tester.php): failed to open stream: No such file or directory in /home/archive/simpletest/test/parse_error_test.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/parse_error_test.php:0
    PHP Fatal error: require_once(): Failed opening required '../unit_tester.php' (include_path='.:/home/bingalls/Zend/workspaces/DefaultWorkspace/checkout/Website:/usr/share/pear:/usr/share/php') in /home/archive/simpletest/test/parse_error_test.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/parse_error_test.php:0
    PHP Warning: require_once(../remote.php): failed to open stream: No such file or directory in /home/archive/simpletest/test/remote_test.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/remote_test.php:0
    PHP Fatal error: require_once(): Failed opening required '../remote.php' (include_path='.:/home/bingalls/Zend/workspaces/DefaultWorkspace/checkout/Website:/usr/share/pear:/usr/share/php') in /home/archive/simpletest/test/remote_test.php on line 3
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/remote_test.php:0
    PHP Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /home/archive/simpletest/test/test_with_parse_error.php on line 5
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 120
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 131
    E_USER_NOTICE: a in /home/archive/simpletest/test/errors_test.php on line 137
    E_USER_NOTICE: b in /home/archive/simpletest/test/errors_test.php on line 138
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 143
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 148
    E_USER_NOTICE: % in /home/archive/simpletest/test/errors_test.php on line 153
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 170
    E_USER_NOTICE: Ouch! in /home/archive/simpletest/test/errors_test.php on line 176
    E_USER_WARNING: Ouch! in /home/archive/simpletest/test/errors_test.php on line 182
    E_USER_ERROR: Ouch! in /home/archive/simpletest/test/errors_test.php on line 188
    E_USER_NOTICE: % in /home/archive/simpletest/test/errors_test.php on line 213
    E_RECOVERABLE_ERROR: Argument 1 passed to RecoverableErrorTestingStub::ouch() must be an instance of RecoverableErrorTestingStub, instance of stdClass given, called in /home/archive/simpletest/test/errors_test.php on line 235 and defined in /home/archive/simpletest/test/errors_test.php(231) : eval()'d code on line 3
    E_USER_NOTICE: Error 1 in /home/archive/simpletest/test/errors_test.php on line 282
    E_USER_NOTICE: Error 2 in /home/archive/simpletest/test/errors_test.php on line 283
    E_USER_NOTICE: Error 1 in /home/archive/simpletest/test/errors_test.php on line 267
    E_NOTICE: Undefined index: tearDown in /home/archive/simpletest/test/exceptions_test.php on line 108
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /home/archive/simpletest/mock_objects.php(1007) : eval()'d code on line 83
    E_USER_ERROR: Cannot set expected arguments as $args parameter is not an array in /home/archive/simpletest/mock_objects.php on line 452
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /home/archive/simpletest/mock_objects.php(1030) : eval()'d code on line 75
    E_WARNING: Missing argument 1 for MockDummyInterface::anotherMethod(), called in /home/archive/simpletest/test/interfaces_test.php on line 30 and defined in /home/archive/simpletest/mock_objects.php(1004) : eval()'d code on line 10
    PHP Warning: require_once(../unit_tester.php): failed to open stream: No such file or directory in /home/archive/simpletest/test/visual_test.php on line 14
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/visual_test.php:0
    PHP Fatal error: require_once(): Failed opening required '../unit_tester.php' (include_path='.:/home/bingalls/Zend/workspaces/DefaultWorkspace/checkout/Website:/usr/share/pear:/usr/share/php') in /home/archive/simpletest/test/visual_test.php on line 14
    PHP Stack trace:
    PHP 1. {main}() /home/archive/simpletest/test/visual_test.php:0

     
  • Marcus Baker

    Marcus Baker - 2008-04-07
    • assigned_to: nobody --> lastcraft
     
  • Marcus Baker

    Marcus Baker - 2008-04-07

    Logged In: YES
    user_id=695819
    Originator: NO

    Hi...

    I am still unable to replicate this. A couple of questions:

    1) Are you running this inside of Eclipse? It looks like the first error is caused by the call to the Eclipse reporter, not the class itself.
    2) What error reporting are you set to? Due to PHP4 compatibility, we cannot yet support E_STRICT.
    3) You have eAccelerator loaded. What are it's settings?

    Could you turn off E_STRICT, eAccelerator and then run the self tests from the command line? It would be easier to diagnose from a working test run. Then I know what components to test.

    yours, Marcus

     
  • Edward Z. Yang

    Edward Z. Yang - 2008-04-09

    Logged In: YES
    user_id=1195258
    Originator: NO

    Bruce,

    The standard method for testing whether or not a library work is not to shove every PHP file through the interpreter. The parse error in the log below is by design, as should be evident from the filename "test/test_with_parse_error.php". As Marcus suggests, a run doing simply "php test/all_tests.php" would be much more useful (in theory, you did run that file, but because of the grep we can't see its contents).

    Have you actually attempted to use the library yet, or are these diagnostic checks the only things you have done?

    Thanks,
    Edward

     
  • Perrick Penet

    Perrick Penet - 2008-04-10

    Logged In: YES
    user_id=292377
    Originator: NO

    Since the error spotted is actually by design, I'm marking this report as "pending". It will close itselft in two weeks. Thanks for testing SimpleTest ;-)

    Yours,
    Perrick

     
  • Perrick Penet

    Perrick Penet - 2008-04-10
    • status: open --> pending-invalid
     
  • Bruce Ingalls

    Bruce Ingalls - 2008-04-10

    Logged In: YES
    user_id=58006
    Originator: YES

    OK. I actually had been using SimpleTest. I see that you are hard at work, fixing E_STRICT warnings.
    I actually found the compile error, by using the command I provided, not from inside Eclipse.

    Sounds like this problem is already being fixed. The only suggestion I would add, is a more clear comment, such as replacing the mysterious
    "wibble"
    with something like
    "This line demonstrates how SimpleTest holds up with PHP compile errors"
    Note that it did take a while for support (and myself) to figure out this problem.

    I did not try php test/all_tests.php before. This is nice to know!
    Incidentally, it generated many E_USER_NOTICE warnings of "Ouch!", which sound intentional (but could use clarity)

    I am running E_STRICT, and likely eAccelerator (I assume XCache would be just as bad)
    Is it at fault for the following warnings coming from SimpleTest?
    ...
    Skip: E_USER_ERROR not tested for PHP 5.2 and above at [/usr/share/pear/simpletest/test/errors_test.php line 243]
    E_USER_NOTICE: Error 1 in /usr/share/pear/simpletest/test/errors_test.php on line 282
    E_USER_NOTICE: Error 2 in /usr/share/pear/simpletest/test/errors_test.php on line 283
    E_USER_NOTICE: Error 1 in /usr/share/pear/simpletest/test/errors_test.php on line 267
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /usr/share/pear/simpletest/mock_objects.php(1007) : eval()'d code on line 83
    E_USER_ERROR: Cannot set expected arguments as $args parameter is not an array in /usr/share/pear/simpletest/mock_objects.php on line 452
    E_USER_NOTICE: Method [aMissingMethod] is not mocked in /usr/share/pear/simpletest/mock_objects.php(1030) : eval()'d code on line 75
    E_WARNING: Missing argument 1 for MockDummyInterface::anotherMethod(), called in /usr/share/pear/simpletest/test/interfaces_test.php on line 30 and defined in /usr/share/pear/simpletest/mock_objects.php(1004) : eval()'d code on line 10
    OK
    Test cases run: 134/140, Passes: 2550, Failures: 0, Exceptions: 0

    I reckon because all of these passed, there is no problem, except for the 6 test cases that cannot handle PHP 5.2.4
    Thanks, Bruce

     
  • Bruce Ingalls

    Bruce Ingalls - 2008-04-10
    • status: pending-invalid --> open-invalid
     
  • Marcus Baker

    Marcus Baker - 2008-04-14

    Logged In: YES
    user_id=695819
    Originator: NO

    Hi...

    These failure for quite a collection. I've added this bug report to the next milestone (1.1beta). We may ask you to do an SVN checkout to confirm progress. Are you happy to do this?

    yours, Marcus

     
  • Marcus Baker

    Marcus Baker - 2008-04-14
    • assigned_to: lastcraft --> nobody
     
  • Nobody/Anonymous

    Hi, I've installed SimpleTest today and change some call function (especialy static symbols) so it runs on my 5.2.6 version of PHP.
    Are you interrested ?

     
  • Edward Z. Yang

    Edward Z. Yang - 2008-12-20

    These errors should all be fixed in the latest SVN build. Please try it out!

     
  • Edward Z. Yang

    Edward Z. Yang - 2008-12-20

    Closed bug as invalid.

     
  • Edward Z. Yang

    Edward Z. Yang - 2008-12-20
    • status: open-invalid --> closed-invalid
     

Log in to post a comment.