Problem/Motivation
The testbot is built with phpdbg
. This allows us to generate coverage reports from PHPUnit with minimal performance penalty. This can be seen in the testbot's native test runs: https://dispatcher.drupalci.org/job/DrupalCI_CI_Ci_ci/403/
The problem: run-tests.sh can't natively handle coverage, and we don't want to run tests twice just for a coverage report.
We also have a situation where if we ran the phpunit
tool to generate a full coverage report, it would take a whole day, or maybe longer. So the advantage of run-tests.sh
in this regard is concurrency.
Proposed resolution
run-tests.sh
invokes simpletest_script_run_one_test()
which can use phpdbg
instead of php
if we want it to generate a coverage report.
We then have PHPUnit generate coverage using --coverage-php
(named .cov files by convention).
At the end of the test run, we use phpcov
to aggregate the .cov files into a Clover XML file.