Skip to content
Extraits de code Groupes Projets
Valider 411b72f0 rédigé par mattab's avatar mattab
Parcourir les fichiers

avoid false positive by skipping this integration test on local dev environment

extra files (such as GeoIP DB) would fail the test
parent 783f6d8b
Chargement en cours
...@@ -14,6 +14,7 @@ use Piwik\Container\StaticContainer; ...@@ -14,6 +14,7 @@ use Piwik\Container\StaticContainer;
use Piwik\Filesystem; use Piwik\Filesystem;
use Piwik\Ini\IniReader; use Piwik\Ini\IniReader;
use Piwik\Plugin\Manager; use Piwik\Plugin\Manager;
use Piwik\Tests\Framework\TestCase\SystemTestCase;
use Piwik\Tracker; use Piwik\Tracker;
use RecursiveDirectoryIterator; use RecursiveDirectoryIterator;
use RecursiveIteratorIterator; use RecursiveIteratorIterator;
...@@ -381,9 +382,13 @@ class ReleaseCheckListTest extends \PHPUnit_Framework_TestCase ...@@ -381,9 +382,13 @@ class ReleaseCheckListTest extends \PHPUnit_Framework_TestCase
*/ */
public function test_TotalPiwikFilesSize_isWithinReasonnableSize() public function test_TotalPiwikFilesSize_isWithinReasonnableSize()
{ {
$maximumTotalFilesizesExpectedInMb = 70; if(!SystemTestCase::isTravisCI()) {
$minimumTotalFilesizesExpectedInMb = 50; // Don't run the test on local dev machine, as we may have other files (not in GIT) that would fail this test
$minimumExpectedFilesCount = 6000; $this->markTestSkipped("Skipped this test on local dev environment.");
}
$maximumTotalFilesizesExpectedInMb = 50;
$minimumTotalFilesizesExpectedInMb = 38;
$minimumExpectedFilesCount = 7000;
$filesizes = $this->getAllFilesizes(); $filesizes = $this->getAllFilesizes();
$sumFilesizes = array_sum($filesizes); $sumFilesizes = array_sum($filesizes);
...@@ -417,10 +422,10 @@ class ReleaseCheckListTest extends \PHPUnit_Framework_TestCase ...@@ -417,10 +422,10 @@ class ReleaseCheckListTest extends \PHPUnit_Framework_TestCase
} }
// in build-package.sh we have: `find ./ -iname 'tests' -type d -prune -exec rm -rf {} \;` // in build-package.sh we have: `find ./ -iname 'tests' -type d -prune -exec rm -rf {} \;`
If(stripos($file, "/tests/") !== false) { if(stripos($file, "/tests/") !== false) {
return false; return false;
} }
If(strpos($file, PIWIK_INCLUDE_PATH . "/tmp/") !== false) { if(strpos($file, PIWIK_INCLUDE_PATH . "/tmp/") !== false) {
return false; return false;
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter