Commit 8b2723a3 authored by Ivan Chepurnyi's avatar Ivan Chepurnyi

Add possibility to disable unit tests for particular modules, if they tests are silently failing

parent 975be950
...@@ -50,6 +50,8 @@ class EcomDev_PHPUnit_Test_Suite extends PHPUnit_Framework_TestSuite ...@@ -50,6 +50,8 @@ class EcomDev_PHPUnit_Test_Suite extends PHPUnit_Framework_TestSuite
$suite = new self('Magento Test Suite'); $suite = new self('Magento Test Suite');
$excludedModules = Mage::getConfig()->getNode('phpunit/suite/exclude');
// Walk through different groups in modules for finding test cases // Walk through different groups in modules for finding test cases
foreach ($groups->children() as $group) { foreach ($groups->children() as $group) {
foreach ($modules->children() as $module) { foreach ($modules->children() as $module) {
...@@ -59,6 +61,10 @@ class EcomDev_PHPUnit_Test_Suite extends PHPUnit_Framework_TestSuite ...@@ -59,6 +61,10 @@ class EcomDev_PHPUnit_Test_Suite extends PHPUnit_Framework_TestSuite
continue; continue;
} }
if (isset($excludedModules->{$module->getName()})) {
continue;
}
$moduleCodeDir = Mage::getBaseDir('code') . DS . (string) $realModule->codePool; $moduleCodeDir = Mage::getBaseDir('code') . DS . (string) $realModule->codePool;
$searchPath = Mage::getModuleDir('', $module->getName()) . DS . 'Test' . DS . (string) $group; $searchPath = Mage::getModuleDir('', $module->getName()) . DS . 'Test' . DS . (string) $group;
......
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
</global> </global>
<phpunit> <phpunit>
<suite> <suite>
<modules /> <!-- List of modules included into test suite -->
<exclude /> <!-- List of modules that are excluded from test suite -->
<yaml> <yaml>
<model>ecomdev_phpunit/yaml_loader</model> <model>ecomdev_phpunit/yaml_loader</model>
<loaders> <loaders>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment