Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 805 Bytes

01-running-tests.md

File metadata and controls

43 lines (28 loc) · 805 Bytes

Running PHP7 tests

Using make

From /home/vagrant/php-src:

$ make test

Substitute test with lcov to run tests and generate an lcov_html output directory with HTML formatted coverage results.

$ make lcov

Using php cli

From /home/vagrant/php-src:

$ TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php [-c optional.ini] run-tests.php

Testing Extensions

$ make test TESTS=ext/<name>

OR

$ TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php [-c optional.ini] run-tests.php ext/<name>

This command will take any extension name or alternatively a valid glob for tests e.g. ext/pcre/tests/*.phpt. For finer grained testing you can pass in a specific .phpt file e.g. ext/pcre/tests/001.phpt