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:
authorThomas Steur <thomas.steur@gmail.com>2015-08-18 14:36:24 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-08-18 14:36:24 +0300
commit87fbda91e28a945156719a1059cf77f175543faf (patch)
tree824c0a0ba31e3db8398e71fc590950541425f112 /plugins/CoreConsole
parentde5f4f219a8eb2b6d23129bb2bf767581b5c3320 (diff)
fix sync processed system tests is no longer possible
Diffstat (limited to 'plugins/CoreConsole')
-rw-r--r--plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php b/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php
index f2f0bddf74..367cee78f1 100644
--- a/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php
+++ b/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php
@@ -9,6 +9,7 @@
namespace Piwik\Plugins\CoreConsole\Commands;
+use Piwik\Common;
use Piwik\Container\StaticContainer;
use Piwik\Decompress\Tar;
use Piwik\Development;
@@ -32,21 +33,24 @@ class DevelopmentSyncProcessedSystemTests extends ConsoleCommand
{
$this->setName('development:sync-system-test-processed');
$this->setDescription('For Piwik core devs. Copies processed system tests from travis artifacts to ' . $this->targetDir);
- $this->addOption('branch', null, InputOption::VALUE_REQUIRED, 'The branch the tests were running on', 'master');
- $this->addArgument('buildnumber', InputArgument::REQUIRED, 'Travis build number you want to sync.');
+ $this->addArgument('buildnumber', InputArgument::REQUIRED, 'Travis build number you want to sync, eg "14820".');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
- $branch = $input->getOption('branch');
$buildNumber = $input->getArgument('buildnumber');
$targetDir = PIWIK_INCLUDE_PATH . '/' . dirname($this->targetDir);
$tmpDir = StaticContainer::get('path.tmp');
$this->validate($buildNumber, $targetDir, $tmpDir);
- $filename = sprintf('processed.%s.tar.bz2', $buildNumber);
- $urlBase = sprintf('http://builds-artifacts.piwik.org/%s/%s/%s', $branch, $buildNumber, $filename);
+ if (Common::stringEndsWith($buildNumber, '.1')) {
+ // eg make '14820.1' to '14820' to be backwards compatible
+ $buildNumber = substr($buildNumber, 0, -2);
+ }
+
+ $filename = sprintf('system.%s.tar.bz2', $buildNumber);
+ $urlBase = sprintf('http://builds-artifacts.piwik.org/piwik/piwik/%s', $filename);
$tests = Http::sendHttpRequest($urlBase, $timeout = 120);
$tarFile = $tmpDir . $filename;