qa:runtests:howtorun

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
qa:runtests:howtorun [2012/05/22 07:51] – [Create a test runner] zoeqa:runtests:howtorun [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 26: Line 26:
  
 ===== Run the code ===== ===== Run the code =====
-At the moment the code will run a single test, eg: +Run a single test, eg: 
-   * runtests my_test.phpt+<code> 
 + runtests my_test.phpt 
 +</code>
  
-All the tests under a given directory, eg: +Run all the tests under a given directory, eg: 
-   * runtests ext/standard/tests/+<code> 
 +  runtests ext/standard/tests/ 
 +</code>
  
-The output format is different to run-tests.php. If a single test is run a short summary is printed to stdout. If one or more directories of tests are run _all_ of the output is saved till the end of the run. Again, a summary is printed to stdout but details are written to a file.+The output format is different to run-tests.php. If a single test is run a short summary is printed to stdout. If one or more directories of tests are run the output is printed after each group (directory) of tests has been run. Again, a summary is printed to stdout but details are written to a file.
  
-See --help for options.+Run all the tests under path_to_php/ext in parallel on 4 processors
  
 +<code>
 +  runtests path_to_php/ext -z 4
 +</code>
  
 +Generate XML formatted output to a file:
  
 +<code>
 +  runtests -o xml -s /tmp/somefile path_to_php/tests
 +</code>
  
-====== QA for run-tests.php ======+Get more verbose results to the screen:  
 +<code> 
 +  runtests -vvv path_to_php/tests 
 +</code>
  
-In the QA directory there is a tar file with a standard set of testsA README in the same directory has instructions on how to use this to check the code. Developers are expected to run this kind of check (in addition to running unit tests) when making significant changes to the code.+Note: there are three levels of verbosity, -v, -vv and -vvv. But default all you will see is a '.' for each test.
  
-A n explanation of the current differences between the old versions of run-tests.php and this one for the set of QA tests is maintained [[/qa/runtests/difference|here]]. 
  
-There are a few tests which fail occasionally both with the new and the old version of the code. In the standard set of QA tests these are:+<code
 +runtests --help 
 +</code>
  
-  * ext/phar/tests/zip/phar_stub.phpt +will give you all of the possible command line options.
-  * ext/standard/tests/mail/mail_variation2.phpt +
-  * ext/standard/tests/mail/mail_basic2.phpt +
  
-Wider ranging tests indicate that there are some tests for the sockets extension that do the same thing 
  
-  * ext/sockets/tests/ipv4loop.phpt 
-  * ext/sockets/tests/socket_create_listen.phpt 
-  * ext/sockets/tests/socket_set_block-retval.phpt 
-  * ext/sockets/tests/socket_set_nonblock-retval.phpt 
  
-We don't have an explanation for this at the moment.  
  
-======Configure options====== 
-The current QA checks use the standard (no options) configure. However as we develop we are extending this to be able to run as many options as possible. This page has a set of configure options that have been tried. 
- 
-==current state:== 
-<html> 
-./configure --prefix=/Users/g2/php/ --with-config-file-path=/Users/g2/php/php53/ --with-pear=/opt/local/ --with-iconv=/opt/local --with-bz2=/opt/local/ --with-zlib=/opt/local/ --with-libxml-dir=/opt/local --with-gettext=/opt/local --with-libexpat-dir=/opt/local --with-freetype-dir=/opt/local --with-openssl=/opt/local/ --with-t1lib=/opt/local/ --with-tidy=/opt/local --with-xsl=/opt/local --with-curl=/opt/local --with-pcre-regex=/opt/local --with-gd --with-jpeg-dir=/opt/local --with-png-dir=/opt/local --with-mhash=/opt/local --with-mcrypt=/opt/local --with-readline=/opt/local --enable-fastcgi --disable-short-tags  --enable-pcntl --enable-soap --enable-exif --enable-sockets --enable-sysvsem --enable-sysvshm --with-xml --enable-sysvmsg --enable-calendar  --enable-exif --with-xmlrpc --enable-ftp --enable-wdd --enable-soap --enable-bcmath --enable-mbstring --enable-dba --enable-zip --with-mime-magic --enable-gd-native-ttf --enable-xdebug   
-</html> 
- 
-==Further Information on configure== 
- 
-[[http://www.php.net/manual/en/configure.php|PHP Manual - configure options]] 
- 
- 
-======phpruntests on Windows====== 
-At frist, make sure to use the correct php-version as described here: [[http://windows.php.net/download/]] 
- 
-A important difference to unix is that you have to execute the script from the directory were your test-cases are stored. 
- 
-We've created a short bat-file which you can use: 
- 
-<code> 
-cd c:\QA 
-set TEST_PHP_CGI_EXECUTABLE=c:\PHP\php-5.3.0-nts-Win32-VC6-x86\php-cgi.exe 
-c:\PHP\php-5.3.0-nts-Win32-VC6-x86\php.exe 
-c:\workspace\phpruntests\src\run-tests.php -p 
-c:\PHP\php-5.3.0-nts-Win32-VC6-x86\php.exe %* 
-</code> 
  
 +======run-tests.php on Windows======
  
 +Running the code should be the same, you will need a runtests.bat file rather than a shell script.
  
qa/runtests/howtorun.1337673108.txt.gz · Last modified: 2017/09/22 13:28 (external edit)