Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-09-22 13:00:50 +0300
committerdiosmosis <benaka@piwik.pro>2015-10-27 07:46:25 +0300
commit8f08bcc9fd175c124f61225c87a587506540ad71 (patch)
treee0fe350b62c2639139eb84d0a6aab419d5a560ea /plugins/TestRunner
parent779fad4906ba8c1c4ab25814b9c9767d5225c8f2 (diff)
Make travis.sh go through tests:run-ui for UI tests so config.js will be generated on travis.
Diffstat (limited to 'plugins/TestRunner')
-rw-r--r--plugins/TestRunner/Commands/TestsRunUI.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/TestRunner/Commands/TestsRunUI.php b/plugins/TestRunner/Commands/TestsRunUI.php
index f6c2b28481..5b3046ed8b 100644
--- a/plugins/TestRunner/Commands/TestsRunUI.php
+++ b/plugins/TestRunner/Commands/TestsRunUI.php
@@ -35,6 +35,7 @@ class TestsRunUI extends ConsoleCommand
$this->addOption('plugin', null, InputOption::VALUE_REQUIRED, "Execute all tests for a plugin.");
$this->addOption('core', null, InputOption::VALUE_NONE, "Execute only tests for Piwik core & core plugins.");
$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).");
+ $this->addOption('extra-options', null, InputOption::VALUE_REQUIRED, "Extra options to pass to phantomjs.");
}
protected function execute(InputInterface $input, OutputInterface $output)
@@ -48,6 +49,7 @@ class TestsRunUI extends ConsoleCommand
$plugin = $input->getOption('plugin');
$skipDeleteAssets = $input->getOption('skip-delete-assets');
$core = $input->getOption('core');
+ $extraOptions = $input->getOption('extra-options');
if (!$skipDeleteAssets) {
AssetManager::getInstance()->removeMergedAssets();
@@ -84,6 +86,10 @@ class TestsRunUI extends ConsoleCommand
$options[] = "--core";
}
+ if ($extraOptions) {
+ $options[] = $extraOptions;
+ }
+
$options = implode(" ", $options);
$specs = implode(" ", $specs);
@@ -108,7 +114,6 @@ class TestsRunUI extends ConsoleCommand
// If the file wasn't generated by this command, we don't ovewrite it
if (file_exists($localConfigFile)) {
$fileContent = file_get_contents($localConfigFile);
- echo "existing contents: ".$fileContent."\n";
if (strpos($fileContent, $tag) === false) {
return;
}
@@ -129,7 +134,7 @@ exports.phpServer = {
REMOTE_ADDR: '127.0.0.1'
};
JS;
-echo "JS: $js\n\n";
+
file_put_contents(PIWIK_INCLUDE_PATH . '/tests/UI/config.js', $js);
}
}