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:
authorStefan Giehl <stefan@piwik.org>2018-05-30 23:27:42 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2018-05-30 23:27:42 +0300
commit0d97cd322cebbd5dfd2d2ffcdbb7f7c5c0349172 (patch)
tree70447252215be3c54a88b2ef6136beb191eabb32 /plugins/CoreConsole
parente26a445a8fb02e617adae53ec083a75dae55a80c (diff)
Adds option to sync system tests files command to directly copy files to expected directory (#13012)
Diffstat (limited to 'plugins/CoreConsole')
-rw-r--r--plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php b/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php
index 082a401a57..d581fd8127 100644
--- a/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php
+++ b/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php
@@ -33,6 +33,7 @@ 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 local processed directories');
$this->addArgument('buildnumber', InputArgument::REQUIRED, 'Travis build number you want to sync, eg "14820".');
+ $this->addOption('expected', 'e', InputOption::VALUE_NONE, 'If given file will be copied in expected directories instead of processed');
}
protected function execute(InputInterface $input, OutputInterface $output)
@@ -44,7 +45,8 @@ class DevelopmentSyncProcessedSystemTests extends ConsoleCommand
protected function updateCoreFiles(InputInterface $input, OutputInterface $output)
{
$buildNumber = $input->getArgument('buildnumber');
- $targetDir = PIWIK_INCLUDE_PATH . '/tests/PHPUnit/System/processed';
+ $expected = $input->getOption('expected');
+ $targetDir = sprintf(PIWIK_INCLUDE_PATH . '/tests/PHPUnit/System/%s', $expected ? 'expected' : 'processed');
$tmpDir = StaticContainer::get('path.tmp') . '/';
$this->validate($buildNumber, $targetDir, $tmpDir);
@@ -77,7 +79,8 @@ class DevelopmentSyncProcessedSystemTests extends ConsoleCommand
protected function updatePluginsFiles(InputInterface $input, OutputInterface $output)
{
$buildNumber = $input->getArgument('buildnumber');
- $targetDir = PIWIK_INCLUDE_PATH . '/plugins/%s/tests/System/processed/';
+ $expected = $input->getOption('expected');
+ $targetDir = sprintf(PIWIK_INCLUDE_PATH . '/plugins/%%s/tests/System/%s/', $expected ? 'expected' : 'processed');
$tmpDir = StaticContainer::get('path.tmp') . '/';
if (Common::stringEndsWith($buildNumber, '.1')) {