Skip to content
Extraits de code Groupes Projets
Valider 155a614f rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Only delete assets in tests:run-ui command to speed up UI tests.

parent 41fb2ec6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -7,6 +7,7 @@
*/
namespace Piwik\Plugins\CoreConsole\Commands;
use Piwik\AssetManager;
use Piwik\Plugin\ConsoleCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
......@@ -26,6 +27,7 @@ class TestsRunUI extends ConsoleCommand
$this->addOption('drop', null, InputOption::VALUE_NONE, "Drop the existing database and re-setup a persisted fixture.");
$this->addOption('assume-artifacts', null, InputOption::VALUE_NONE, "Assume the diffviewer and processed screenshots will be stored on the builds artifacts server. For use with travis build.");
$this->addOption('plugin', null, InputOption::VALUE_REQUIRED, "Execute all tests for a plugin.");
$this->addOption('skip-delete-assets', null, InputOption::VALUE_NONE, "Skip deleting of merged assets (will speed up a test run, but not by a lot).");
}
protected function execute(InputInterface $input, OutputInterface $output)
......@@ -37,6 +39,11 @@ class TestsRunUI extends ConsoleCommand
$drop = $input->getOption('drop');
$assumeArtifacts = $input->getOption('assume-artifacts');
$plugin = $input->getOption('plugin');
$skipDeleteAssets = $input->getOption('skip-delete-assets');
if (!$skipDeleteAssets) {
AssetManager::getInstance()->removeMergedAssets();
}
$options = array();
if ($persistFixtureData) {
......@@ -73,4 +80,4 @@ class TestsRunUI extends ConsoleCommand
passthru($cmd);
}
}
\ No newline at end of file
}
......@@ -62,8 +62,6 @@ class UITestFixture extends SqlDump
$this->createSegments();
$this->setupDashboards();
AssetManager::getInstance()->removeMergedAssets();
$visitorIdDeterministic = bin2hex(Db::fetchOne(
"SELECT idvisitor FROM " . Common::prefixTable('log_visit')
. " WHERE idsite = 2 AND location_latitude IS NOT NULL LIMIT 1"));
......@@ -301,4 +299,4 @@ class UITestFixture extends SqlDump
Access::setSingletonInstance($access = new OverrideLogin());
\Piwik\Piwik::postEvent('Request.initAuthenticationObject');
}
}
\ No newline at end of file
}
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