tests: Don't include modules which provide a `phpunit.xml`

Some modules may require their very own phpunit configuration in order to run.
This commit is contained in:
Johannes Meyer 2019-05-13 09:20:13 +02:00
parent ed21fe280e
commit 970eb6c56a
1 changed files with 4 additions and 2 deletions

View File

@ -188,7 +188,9 @@ class PhpCommand extends Command
{
$modulePaths = [];
foreach (Icinga::app()->getModuleManager()->getModuleInfo() as $module) {
$modulePaths[] = $module->path;
if (! file_exists($module->path . '/phpunit.xml')) {
$modulePaths[] = $module->path;
}
}
$vars = array();
@ -247,7 +249,7 @@ class PhpCommand extends Command
foreach ($app->getModuleManager()->getModuleInfo() as $module) {
$testPhp = "$module->path/test/php";
if (file_exists($testPhp)) {
if (file_exists($testPhp) && ! file_exists($module->path . '/phpunit.xml')) {
$unitModules->appendChild($phpunitXml->createElement('directory', $testPhp));
$testPhpRegression = "$testPhp/regression";